<header class="main-header">

    <a href="<?php echo e(route('admin.dashboard')); ?>" class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini">
           <?php echo e(substr(co_name(), 0, 1)); ?>

        </span>

        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg">
            <?php echo e(co_name()); ?>

        </span>
    </a>

    <nav class="navbar navbar-static-top" role="navigation">
        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only"><?php echo e(trans('labels.general.toggle_navigation')); ?></span>
        </a>

        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">

<li class="dropdown messages-menu">
                    <a href="<?php echo e(URL::route('admin.superadmin.chat')); ?>" target="_blank">
                        <i class="fa fa-envelope-o"></i>
                        <span class="label label-default message_count"><?php echo e(\App\Message::where('to', auth()->user()->id)->where('read', null)->count()); ?></span>
                    </a>
                </li>
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <img src="<?php echo e(access()->user()->picture); ?>" class="user-image" alt="User Avatar"/>
                        <span class="hidden-xs"><?php echo e(access()->user()->full_name); ?></span>
                    </a>

                    <ul class="dropdown-menu">
                        <li class="user-header">
                            <img src="<?php echo e(access()->user()->picture); ?>" class="img-circle" alt="User Avatar" />
                            <p>
                                <?php echo e(access()->user()->full_name); ?> - <?php echo e(implode(", ", access()->user()->roles->pluck('name')->toArray())); ?>

                                <small><?php echo e(trans('strings.backend.general.member_since')); ?> <?php echo e(access()->user()->created_at->format("m/d/Y")); ?></small>
                            </p>
                        </li>

                        <li class="user-footer">
                            <div class="pull-right">
                                <a href="<?php echo route('frontend.auth.logout'); ?>" class="btn btn-danger btn-flat">
                                    <i class="fa fa-sign-out"></i>
                                    <?php echo e(trans('navs.general.logout')); ?>

                                </a>
                            </div>
                        </li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-custom-menu -->
    </nav>
</header>
