FilamentF
Filament7mo ago
o.m

getPages not working on Custom Page

I am trying to redirect a View Custom page to another Custom Page.

So I added this on Notificaiton custom Page

    public static function getPages() : array
    {
        return [
            'edit'  => EditNotification::route('/{slug}/edit'),
        ];
    }

The EditNotification is another custom page where I wanted to show specific datas
However I do not see the route on phpartisan list causing me to have Route [filament.pages.notifications.edit] not defined.
image.png
Solution
Was able to solve it by using this on custom page protected static ?string $slug = 'notification/{slug}/edit';
Was this page helpful?