From f33f91698ef50a0819c29bca52c683b581ef67f3 Mon Sep 17 00:00:00 2001 From: MartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:49:19 +0100 Subject: [PATCH] Add exit admin to Menu (#723) --- app/Providers/Filament/AdminPanelProvider.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 829f893fbf..0b481e1f5b 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -8,6 +8,7 @@ use Filament\Http\Middleware\Authenticate; use Filament\Http\Middleware\DisableBladeIconComponents; use Filament\Http\Middleware\DispatchServingFilamentEvent; +use Filament\Navigation\MenuItem; use Filament\Panel; use Filament\PanelProvider; use Filament\Support\Enums\MaxWidth; @@ -45,6 +46,13 @@ public function panel(Panel $panel): Panel ->brandLogo(config('app.logo')) ->brandLogoHeight('2rem') ->profile(EditProfile::class, false) + ->userMenuItems([ + MenuItem::make() + ->label('Exit Admin') + ->url('/') + ->icon('tabler-arrow-back') + ->sort(24), + ]) ->maxContentWidth(MaxWidth::ScreenTwoExtraLarge) ->spa() ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')