spa() ->id('admin') ->breadcrumbs(false) ->middleware([ RecordUserActivity::class, ]) ->userMenuItems([ ExportAction::make('download_betfair') ->columnMapping(false) ->exporter(BetfairExporter::class) ->label('Download Betfair') ->visible(fn(): bool => auth()->user()->hasRole('download_betfair')) ->fileName(fn(Export $export): string => 'betfair-odds-' . date('d.m.Y-H.i') . "-{$export->getKey()}") ->modifyQueryUsing(fn(Builder $query) => $query->whereHas('odds_3ways_bf') ->whereHas('odds_totals_bf') ->where('sport_id', 1)) ->icon('phosphor-download'), ]) ->path('') ->login() ->passwordReset(RequestPasswordReset::class) ->emailVerification() ->emailChangeVerification() ->databaseNotifications() ->databaseNotificationsPolling('10s') // default is 30 ->profile(isSimple: false) ->default() ->globalSearch(false) ->globalSearchKeyBindings(['command+k', 'ctrl+k']) ->brandLogo(asset('logo/statistiko.svg')) ->darkModeBrandLogo(asset('logo/statistiko-d.svg')) ->favicon(asset('logo/sta.svg')) ->brandName('') ->brandLogoHeight('2rem') ->unsavedChangesAlerts() ->topNavigation() ->multiFactorAuthentication([ EmailAuthentication::make(), AppAuthentication::make() ->recoverable(), ]) // ], isRequired: true) ->viteTheme('resources/css/filament/admin/theme.css') ->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources') ->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages') ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\Filament\Widgets') ->discoverClusters(in: app_path('Filament/Clusters'), for: 'App\\Filament\\Clusters') ->maxContentWidth(Width::ScreenTwoExtraLarge) ->breadcrumbs(false) ->sidebarCollapsibleOnDesktop(false) ->userMenuItems([ 'profile' => Action::make('profile') ->label(fn() => Auth::user()->name) ->url(fn(): string => EditProfilePage::getUrl()) ->icon('phosphor-user-circle-fill'), ]) ->pages([ Statistic::class, ]) ->widgets([]) ->middleware([ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, AuthenticateSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, SubstituteBindings::class, DisableBladeIconComponents::class, DispatchServingFilamentEvent::class, ]) ->authMiddleware([ Authenticate::class, ])->plugins([ FilamentShieldPlugin::make() ->navigationGroup('User') ->navigationSort(10) ->navigationBadge(5), // HooksHelperPlugin::make(), FilamentEditProfilePlugin::make()->shouldRegisterNavigation(false), LightSwitchPlugin::make()->position(Alignment::BottomCenter), FilamentBackgroundsPlugin::make() ->imageProvider(MyImages::make()->directory('images/backgrounds')), ]); } }