The POST method is not supported for route admin/login for custom login page
Hello,
I have an issue with a custom login page in Laravel 11 with Filament 3. When I submit the form, I get the error:
"The POST method is not supported for route admin/login. Supported methods: GET, HEAD."
Here’s my setup:
Custom Login Class
Added to AdminPanelProvider
Custom Template
Despite this, the error persists. Is there something I missed in the configuration?
Thanks for your help!
3 Replies
It seems that the issue is related to my custom layout.
When I remove it, the login works perfectly, but the CSS does not render as expected.
Any ideas?
the error you get "The POST method is not supported for route admin/login. Supported methods: GET, HEAD" means that livewire/livewire.js is not loaded. or at least this happens for me.
the problem you are facing is that livewire/livewire.js is a route and your server tries to load it as a file.
Try to check the vhost config or try to publish the livewire files.
in my case the problem from vhost was this line . If you remove the JS from that list it would work. But i think the vendor:publish method is better
php artisan vendor:publish --force --tag=livewire:assets
Hello 👋 , I tried publishing the Livewire files, but it still doesn't work 😬