<nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent">
    <div class="container-fluid">
        <div class="navbar-wrapper d-none">
            <div class="navbar-toggle d-inline">
                <button type="button" class="navbar-toggler">
                    <span class="navbar-toggler-bar bar1"></span>
                    <span class="navbar-toggler-bar bar2"></span>
                    <span class="navbar-toggler-bar bar3"></span>
                </button>
            </div>
            <a class="navbar-brand" href="#"><?php echo e($page ?? __('Dashboard')); ?></a>
        </div>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-expanded="false" aria-label="<?php echo e(__('Toggle navigation')); ?>">
            <span class="navbar-toggler-bar navbar-kebab"></span>
            <span class="navbar-toggler-bar navbar-kebab"></span>
            <span class="navbar-toggler-bar navbar-kebab"></span>
        </button>
        <div class="collapse navbar-collapse" id="navigation">
            <ul class="navbar-nav ml-auto">
            <?php
            $results = DB::select("SELECT count(id) as unread_msg FROM `chats` where from_role='user' and status='unread'");
             if(!empty($results)){
                 $unread_msg=$results[0]->unread_msg;
                 if($unread_msg>0){
                      $msgcount=$unread_msg;
                 }else{
                  $msgcount=0;
                 }
             }else{
              $msgcount=0;
             }
             
            ?>
                <li class="dropdown nav-item">

               
               <?php echo ($msgcount>0)?'<a href="#" class="notif">  <span class="num">'.$msgcount.'</span></a>':'';?>
               </li>
                <li class="dropdown nav-item">
                  
                    <a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
                        <div class="photo">
                            <img src="<?php echo e(asset('black')); ?>/img/anime3.png" alt="<?php echo e(__('Profile Photo')); ?>">
                        </div>
                        <b class="caret d-none d-lg-block d-xl-block"></b>
                        <p class="d-lg-none"><?php echo e(__('Log out')); ?></p>
                    </a>
                    <ul class="dropdown-menu dropdown-navbar">
                        <li class="nav-link">
                            <a href="<?php echo e(route('profile.edit')); ?>" class="nav-item dropdown-item"><?php echo e(__('Profile')); ?></a>
                        </li>
                        <li class="dropdown-divider"></li>
                        <li class="nav-link">
                            <a href="<?php echo e(route('admin.logout')); ?>" class="nav-item dropdown-item" onclick="event.preventDefault();  document.getElementById('adminlogout-form').submit();"><?php echo e(__('Log out')); ?></a>
                        </li>
                    </ul>
                </li>
                <li class="separator d-lg-none"></li>
            </ul>
        </div>
    </div>

</nav>
 <?php if(session()->has('accessmessage')): ?>
            <p class="btn btn-success btn-block btn-sm custom_message text-left"><?php echo e(session()->get('accessmessage')); ?></p>
          <?php endif; ?>
<div class="modal modal-search fade" id="searchModal" tabindex="-1" role="dialog" aria-labelledby="searchModal" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <input type="text" class="form-control" id="inlineFormInputGroup" placeholder="<?php echo e(__('SEARCH')); ?>">
                <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('Close')); ?>">
                    <i class="tim-icons icon-simple-remove"></i>
              </button>
            </div>
        </div>
    </div>
</div>
<style>

a.notif {
  position: relative;
  display: block;
  height: 50px;
  width: 50px;
  background: url('http://i.imgur.com/evpC48G.png');
  background-size: contain;
  text-decoration: none;
}
.num {
  position: absolute;
  right: 11px;
  top: 6px;
  color: #fff;
}
</style><?php /**PATH /home/sibzsolu/public_html/training/stimclex/resources/views/layouts/navbars/navs/auth.blade.php ENDPATH**/ ?>