I am getting a 404 on my create page in a second panel

I had it working previously. I have a Report creation page in a Teacher panel. The ReportResource mirrors my admin ReportResoucre and the CreateReport page was generated using the artisan command at the beginning of the project
php artisan make:filament-resource Customer --generate
php artisan make:filament-resource Customer --generate
I even tried re-generating them but I still get a 404 only on the Create route I checked that it is registered in my ReportResource and it looks like this:
public static function getPages(): array
{
return [
'index' => Pages\ListReports::route('/'),
'view' => Pages\ViewReport::route('/{record}'),
'create' => Pages\CreateReport::route('/create'),
'edit' => Pages\EditReport::route('/{record}/edit'),
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListReports::route('/'),
'view' => Pages\ViewReport::route('/{record}'),
'create' => Pages\CreateReport::route('/create'),
'edit' => Pages\EditReport::route('/{record}/edit'),
];
}
All other pages are working and the CreateReport.php file exists.
1 Reply
thisisthejay
thisisthejayOP6mo ago
I resolved it! The order of the array in getPages() matters!
Want results from more Discord servers?
Add your server