I'm having trouble transferring my project to the production server and livewire stops working. The server is running nginx.
When I fire the wire:click event (click the button) inside the component, I get the error in the response:
SymfonyComponentHttpKernelExceptionMethodNotAllowedHttpException: The GET method is not supported for this route. Supported methods: POST. in file /data/*****/****/******/*******/vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php on line 118 #0 /data/****/*****/*****/*****/vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php(104): IlluminateRoutingAbstractRouteCollection->methodNotAllowed()
This is a fresh Laravel installation, almost empty components, just simple dd(). It's not a full page component, so I didn't set the route type (GET or POST) in paths/web.php. This component is simply called via @livewire() within the Blade file. It runs on my local machine using apache on docker and on another live server using apache without any issues.
Do you know what causes this problem? Thanks for your help in advance.
I think you should run
php artisan livewire:publish --assets
to the public Livewire