<nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <ul class="navbar-nav">
        <li class="nav-item">
            <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
        </li>
    </ul>
    <ul class="navbar-nav ml-auto">
        @if(auth()->check())
        <li class="nav-item dropdown">
            <a class="nav-link" data-toggle="dropdown" href="#">
                <i class="fas fa-user"></i> {{ auth()->user()->name ?? auth()->user()->username }}
            </a>
            <div class="dropdown-menu dropdown-menu-right">
                <a class="dropdown-item" href="{{ config('kylin-adminlte.profile_url') }}">
                    <i class="fas fa-user mr-2"></i> 个人中心
                </a>
                <div class="dropdown-divider"></div>
                <form method="POST" action="{{ config('kylin-adminlte.logout_url') }}">
                    @csrf
                    <button type="submit" class="dropdown-item">
                        <i class="fas fa-sign-out-alt mr-2"></i> 退出登录
                    </button>
                </form>
            </div>
        </li>
        @endif
    </ul>
</nav>
