@php $user = filament()->auth()->user(); $items = filament()->getUserMenuItems(); $profileItem = $items['profile'] ?? $items['account'] ?? null; $profileItemUrl = $profileItem?->getUrl(); $profilePage = filament()->getProfilePage(); $hasProfileItem = filament()->hasProfile() || filled($profileItemUrl); $logoutItem = $items['logout'] ?? null; $items = \Illuminate\Support\Arr::except($items, ['account', 'logout', 'profile']); @endphp {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::USER_MENU_BEFORE) }} @if ($profileItem?->isVisible() ?? true) {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::USER_MENU_PROFILE_BEFORE) }} @if ($hasProfileItem) {{ $profileItem?->getLabel() ?? ($profilePage ? $profilePage::getLabel() : null) ?? filament()->getUserName($user) }} @else {{ $profileItem?->getLabel() ?? filament()->getUserName($user) }} @endif {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::USER_MENU_PROFILE_AFTER) }} @endif @if (filament()->hasDarkMode() && (! filament()->hasDarkModeForced())) @endif @foreach ($items as $key => $item) @php $itemPostAction = $item->getPostAction(); @endphp {{ $item->getLabel() }} @endforeach {{ $logoutItem?->getLabel() ?? __('filament-panels::layout.actions.logout.label') }} {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::USER_MENU_AFTER) }}