hamidali's avatar

405 Method not allowed

I am getting an error on the production server when I try to log in to the filament panel. Everything works fine on the local server.

On the local server, I tested the network call and surprisingly it is sending a post request to the route /livewire/update. When I try to log in on the production server it sends a post request to /admin/login and this route is not defined as I have checked the routes list.

Any idea what is going on here...

1 like
4 replies
hamidali's avatar
hamidali
OP
Best Answer
Level 9

I was not checking the resources and now found out that the livewire js was not loading (giving 404) so i changed the resource path in appserviceprovide:

Livewire::setScriptRoute(function ( $handle ) {
            return Route::get('/livewire/live-wire-js', $handle);
        });

Now it is working fine...

incase someone else needs fixing...

1 like
OccTherapist's avatar

Actually you can just publish the Livewire assets with the command

php artisan vendor:publish
3 likes
MladenJanjetovic's avatar

@OccTherapist Publishing this with tag livewire:assets actually works for me. It's strange that I can't find this in documentation for Production deployment and I am working with latest Laravel/Filament setup.

1 like

Please or to participate in this conversation.