FilamentF
Filamentβ€’4mo ago
SUNSHINE

Error while overriding the Login page

Hello guys πŸ™‚

Maybe another dumb question, but I think I carefully read the doc and follow all the steps, and I'm actually getting this error:
Method App\Filament\Pages\Login::getCachedSubNavigation does not exist.
while trying to override the Login page.


<?php

namespace App\Filament\Pages;

use Filament\Auth\Pages\Login as BaseLogin;

class Login extends BaseLogin
{
    protected string $view = 'filament.pages.login';
}



use App\Filament\Pages\Login;

class MainPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->default()
            ->id('main')
            ->path('')
            ->login(Login::class) // My new custom page


Any idea ? Thanks!
Solution
Ok problem found, if you want to override Login component, you need to use in your blade:

<x-filament-panels::page.simple>
    Hey!
</x-filament-panels::page.simple>
Was this page helpful?