The GET method is not supported for route /. Supported methods: HEAD.

Getting that error and I'm not sure why or even how to debug this. The laravel.log file has no error. Looking at the debuggar it just shows that error so I have no clue how to debug this.
We get this error when i do: php artisan route:cache If I do this everything works: php artisan route:clear I was told we want to cache the routes though. Any advice on how to debug this?
4 Replies
Dennis Koch
Dennis Koch2w ago
Is this only Filament routes? Or also Laravel routes?
Fly_Moe
Fly_Moe2w ago
@Dennis Koch Only for Filament. We aren't running any laravel controllers or routes.
Bannakaffalatta
Bannakaffalatta22h ago
I'm running into this issue as well. It is only an issue on the root / route for the Dashboard, all other routes work fine. Though my set up I'm doing a little weird which I'll try to explain as short as possible. I am upgrading a CMS to use filament locked to the /v2/ folder. The way I have it set up in my vhost for apache is using an Alias such as Alias /v2 /var/www/cms/public while the v1 cms public directory lives at /var/www/cms/www.80/ My initial AdminPanelProvider has it's path('') to allow it to be the root https://cms.test/v2/ When things are not optimized (routes cached), everything works normal. Going to https://cms.test/v2/ filament dashboard loads and all my resources and routes work fine. When I run php artisan optimize, only https://cms.test/v2/ throws this GET not supported only HEAD. If I go to any of the other resources such as https://cms.test/v2/pages it loads and works fine. So it seems only the dashboard route is having the issue. I added /v2/ to the path('v2/'), then optimize (cache routes) and it loads the dashboard at https://cms.test/v2 and https://cms.test/v2/v2/ though all the resources are now accessed at https://cms.test/v2/v2/pages Cached routes seem to include both GET/HEAD so not sure where it's looking for /
'/' =>
array (
0 =>
array (
0 =>
array (
'_route' => 'filament.admin.pages.dashboard',
),
1 => NULL,
2 =>
array (
'GET' => 0,
'HEAD' => 1,
),
3 => NULL,
4 => false,
5 => false,
6 => NULL,
),
),
'/' =>
array (
0 =>
array (
0 =>
array (
'_route' => 'filament.admin.pages.dashboard',
),
1 => NULL,
2 =>
array (
'GET' => 0,
'HEAD' => 1,
),
3 => NULL,
4 => false,
5 => false,
6 => NULL,
),
),
Dennis Koch
Dennis Koch19h ago
Feels like it should be ->path('/') but the APP_URL should include /v2