Error "Route not defined" on newly create resource

I am creating a new resource i don't know why this error is generating using this command to create resource php artisan make:filament-resource Order --generate also resource is created but there is no route in the php artisan route:list how to add this route ?
11 Replies
Dennis Koch
Dennis Koch2y ago
It's probably a Cache issue
Ali Abbas
Ali AbbasOP2y ago
@Dennis Koch ok let me clear the cache of application
Dennis Koch
Dennis Koch2y ago
This issue appeared numerous times here on Discord.
Ali Abbas
Ali AbbasOP2y ago
@Dennis Koch i cleared cache but still same issue @Dennis Koch can you please help me how to solve this ?
Dennis Koch
Dennis Koch2y ago
Sorry, there's is not much I can do. Something is stuck somewhere. But it's on your machine and that' hard to debug via Discord.
Ali Abbas
Ali AbbasOP2y ago
@Dennis Koch ok i can again try by clearing cache
Dennis Koch
Dennis Koch2y ago
Try clearing route cache. Maybe restart PHP.
IndomieRendang
Do you have something like this at the bottom of your resource?
public static function getPages(): array
{
return [
'index' => ...
];
}
public static function getPages(): array
{
return [
'index' => ...
];
}
Ali Abbas
Ali AbbasOP2y ago
@margarizaldi yes i have this
IndomieRendang
Does it happen on all resources you create?
Ali Abbas
Ali AbbasOP2y ago
@margarizaldi all resources are working fine except the new ones it worked by clearing route cache Thanks @Dennis Koch done
Want results from more Discord servers?
Add your server