default() ->id('admin') ->path('admin') ->login() //->maxContentWidth(MaxWidth::Small) //->simplePageMaxContentWidth(MaxWidth::Medium) // ->login(Login::class, function (Login $login) { // $login->formActions([ // ...$login->getFormActions(), // Action::make('forgotPassword') // ->label('Forgot your password?') // ->url(route('password.request')), // ]); // }) // ->favicon(asset('/assets/crilogo1.png')) ->favicon(asset('assets/crilogo1.png')) ->colors([ 'primary' => Color::Amber, ]) ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources') ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages') ->pages([ ]) ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets') // ->widgets([ // Widgets\AccountWidget::class, // Widgets\FilamentInfoWidget::class, // ]) ->middleware([ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, AuthenticateSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, SubstituteBindings::class, DisableBladeIconComponents::class, DispatchServingFilamentEvent::class, ]) ->authMiddleware([ Authenticate::class, ]) ->tenantMiddleware([ SyncSpatiePermissionsWithFilamentTenants::class, ], isPersistent: true) ->databaseNotifications() // ->renderHook(PanelsRenderHook::AUTH_LOGIN_FORM_AFTER, function () { // // Use Filament panel helper for login URL and custom route for forgot password // return '
// // Forgot your password? // //
'; // }) //->renderHook('panels::body.end', fn () => view('components.pages.folder-picker-script')) ->renderHook( PanelsRenderHook::SIDEBAR_NAV_START, fn () => view('components.navigation-filter') ) ->plugin(FilamentSpatieRolesPermissionsPlugin::make()); } // public function boot(): void // { // FilamentView::registerRenderHook( // 'panels::head.end', // fn() => ' // // // // ' // ); // FilamentView::registerRenderHook('panels::body.end', function () { // return ''; // }); // } // public function boot(): void // { // FilamentView::registerRenderHook('panels::head.end', function () { // // Only inject on the "home" page (or specific route) // if (url()->current() == config('app.url') . '/admin') { // return ' // // // // '; // } // return ''; // Do not inject on other pages // }); // // Only include PWA install script if on home page // FilamentView::registerRenderHook('panels::body.end', function () { // if (url()->current() == config('app.url') . '/admin') { // return ''; // } // return ''; // }); // } }