Files
lsky-pro/resources/views/layouts/user-nav.blade.php
T
2022-03-12 17:57:21 +08:00

24 lines
1.2 KiB
PHP

<!-- Profile dropdown -->
<x-dropdown>
<x-slot name="trigger">
<button type="button" class="bg-gray-800 flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
<span class="sr-only">Open user menu</span>
<img class="h-8 w-8 rounded-full" src="{{ Auth::user()->avatar }}" alt="">
<span class="px-2 sm:block hidden">{{ Auth::user()->name }}</span>
</button>
</x-slot>
<x-slot name="content">
<!-- Authentication -->
<form method="POST" action="{{ route('logout') }}">
@csrf
<x-dropdown-link href="{{ route('images') }}">我的图片</x-dropdown-link>
<x-dropdown-link href="{{ route('dashboard') }}">仪表盘</x-dropdown-link>
<x-dropdown-link href="{{ route('settings') }}">设置</x-dropdown-link>
<x-dropdown-link :href="route('logout')" onclick="event.preventDefault(); this.closest('form').submit();">
{{ __('Log Out') }}
</x-dropdown-link>
</form>
</x-slot>
</x-dropdown>