Laravel Livewire not working after streaming to live server running nginx
P粉043470158
P粉043470158 2023-12-13 22:47:38
0
1
454

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.

P粉043470158
P粉043470158

reply all(1)
P粉803527801

I think you should run php artisan livewire:publish --assets to the public Livewire

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!