Arre
Arre
FFilament
Created by Arre on 8/27/2024 in #❓┊help
Error with updating a post request -(CSRF-token) - Livewire/update
What I'm Trying to Do: I'm creating a settings page using the Spatie Laravel Settings plugin. What I Did: I recently resumed coding after a 5-6 month break. The last time I coded was with Laravel 10.10, right before Laravel 11 was released. Transitioning to Laravel 11 has been very challenging, especially with the structural changes in the framework. Previously, I had everything working just fine in v.10.10. However, since the update to Laravel 11 and the changes to the app folder, I'm encountering issues. Specifically, I'm receiving a CSRF error, and the POST request isn't updating as expected. The Issue/Error: I'm getting a 419 Page Expired error, which indicates a CSRF token issue. I do have a _token in the payload. If I disable CSRF protection in boostrap/app.php, everything works fine, but I know disabling CSRF is not a good practice and should only be a temporary solution. The request is being sent to /livewire/update, and I'm unsure how to resolve this issue with Laravel 11's new structure, especially since the middleware folder has been removed. I'm also not sure if it's interfering with Spatie's MediaLibrary since I do also have that installed. Where the icon/favicon could be causing the issue here.
3 replies