F
Filament13mo ago
Chanda

My Custom Pages Routes Suddenly throwing 404

Hey I have created a few custom pages and linked them to the model resource. Also I have registered the routes of those custom pages in the Actual resource under getPages as :
public static function getPages(): array
{
return [


'index' => Pages\ListLoans::route('/'),
'active' => Pages\ActiveLoans::route('/active'),
'pending' => Pages\PendingLoans::route('/pending'),
'denied' => Pages\DeniedLoans::route('/denied'),
'defaulted' => Pages\DefaultedLoans::route('/defaulted'),
'create' => Pages\CreateLoan::route('/create'),
'view' => Pages\ViewLoan::route('/{record}'),
'edit' => Pages\EditLoan::route('/{record}/edit'),

];
}
public static function getPages(): array
{
return [


'index' => Pages\ListLoans::route('/'),
'active' => Pages\ActiveLoans::route('/active'),
'pending' => Pages\PendingLoans::route('/pending'),
'denied' => Pages\DeniedLoans::route('/denied'),
'defaulted' => Pages\DefaultedLoans::route('/defaulted'),
'create' => Pages\CreateLoan::route('/create'),
'view' => Pages\ViewLoan::route('/{record}'),
'edit' => Pages\EditLoan::route('/{record}/edit'),

];
}
I have added the navigation Icon to these custom groups. Now the problem is each time I try to access the route am getting a 404.
1 Reply
toeknee
toeknee13mo ago
Which route? are you sure the user can view the record? I've seen it where you get a 404 finding by ID of a resource you have no access too. I suggest looking at the queries for the page you are accessing and seeing what it is trying to find.
Want results from more Discord servers?
Add your server