F
Filament6mo ago
abkrim

The POST method is not supported for route admin/login. Supported methods: GET, HEAD. 405 ERROR

I'm trying to log in to my app (local and production) which was working until now. After seeing a black screen, delete cookies to start from 0. When logging in (username + password correct double check) I find an error. Symfony \ Component\ HttpKernel\ Exception\ MethodNotAllowedHttpException The POST method is not supported for route admin/login. Supported methods: GET, HEAD. Working with: - PHP 8.2.16 - Laravel Herd In the web tools, I see > POST https://sitelight.test/admin/login 405 (Method Not Allowed)The login is Filament after put mi credentials an click for enter.
a route:list | grep admin | grep login
GET|HEAD admin/login ........................................... .................................................. .................................................. .................................................. .................................... filament.admin.auth.login › Filament\Pages › Login<
a route:list | grep admin | grep login
GET|HEAD admin/login ........................................... .................................................. .................................................. .................................................. .................................... filament.admin.auth.login › Filament\Pages › Login<
Others projects in mi machine work fine. All projects update today and on Laravel 10 Also I see this error on Dev Tools login:892 Livewire: The published Livewire assets are out of date See: https://livewire.laravel.com/docs/installation#publishing-livewires-frontend-assets (anonymous) @ login:892 I've tried
a livewire:publish --assets

INFO Publishing [livewire:assets] assets.

Copying directory [vendor/livewire/livewire/dist] to [public/vendor/livewire] ............................................................... DONE
a livewire:publish --assets

INFO Publishing [livewire:assets] assets.

Copying directory [vendor/livewire/livewire/dist] to [public/vendor/livewire] ............................................................... DONE
But same problem.
7 Replies
abkrim
abkrim6mo ago
I older post >Is there a fix for this? I upgraded to Filament v3.2.44 and now I cannot log in anymore to the admin panel... >Edit: I fixed this for my installation by re-publishing the Livewire assets . I also added the >following to composer.json in the scripts/post-autoload-dump section:- php artisan vendor:publish --force --tag=livewire:assets --ansi`
pythonista
pythonista6mo ago
How did you solve this
awcodes
awcodes6mo ago
I would say don’t publish the livewire js file. Add a config setting in your nginx config to serve it through php instead of as a static js file. That’s how it’s meant to work.
pythonista
pythonista6mo ago
Thank you
awcodes
awcodes6mo ago
Try this in your nginx config.
location ^~ /livewire {
try_files $uri $uri/ /index.php?$query_string;
}
location ^~ /livewire {
try_files $uri $uri/ /index.php?$query_string;
}
gigiloouu
gigiloouu6mo ago
INFO No publishable resources for tag [livewire:assets].
INFO No publishable resources for tag [livewire:assets].
when i try to publish its return this how ican fixit?
limewater23
limewater236mo ago
this works!!!! Thank you soooooooooooooooooooooo much
Want results from more Discord servers?
Add your server