id('server') ->path('server') ->homeUrl('/') ->spa() ->databaseNotifications() ->tenant(Server::class) ->brandName(config('app.name', 'Pelican')) ->brandLogo(config('app.logo')) ->brandLogoHeight('2rem') ->favicon(config('app.favicon', '/pelican.ico')) ->topNavigation(config('panel.filament.top-navigation', true)) ->maxContentWidth(config('panel.filament.display-width', 'screen-2xl')) ->login(Login::class) ->userMenuItems([ 'profile' => MenuItem::make() ->label(fn () => trans('filament-panels::pages/auth/edit-profile.label')) ->url(fn () => EditProfile::getUrl(panel: 'app')), MenuItem::make() ->label('Server List') ->icon('tabler-brand-docker') ->url(fn () => ListServers::getUrl(panel: 'app')) ->sort(6), MenuItem::make() ->label('Admin') ->icon('tabler-arrow-forward') ->url(fn () => Filament::getPanel('admin')->getUrl()) ->sort(5) ->visible(fn (): bool => auth()->user()->canAccessPanel(Filament::getPanel('admin'))), ]) ->navigationItems([ NavigationItem::make('Open in Admin') ->url(fn () => EditServer::getUrl(['record' => Filament::getTenant()], panel: 'admin', tenant: null), true) ->visible(fn () => auth()->user()->can('view server', Filament::getTenant())) ->icon('tabler-arrow-back') ->sort(99), ]) ->discoverResources(in: app_path('Filament/Server/Resources'), for: 'App\\Filament\\Server\\Resources') ->discoverPages(in: app_path('Filament/Server/Pages'), for: 'App\\Filament\\Server\\Pages') ->discoverWidgets(in: app_path('Filament/Server/Widgets'), for: 'App\\Filament\\Server\\Widgets') ->middleware([ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, AuthenticateSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, SubstituteBindings::class, DisableBladeIconComponents::class, DispatchServingFilamentEvent::class, ServerSubject::class, ]) ->authMiddleware([ Authenticate::class, ]); } }