I have included the csrf-token in the post request.
How have you included the token?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm making post request inside a react.js component and always got the 419 Error: Sorry, your session has expired. Please refresh and try again. I have included the csrf-token in the post request. I tried both the fetch api and axios but got the same result. But if I added the route to the $except[] array in veryfycsrftoken.php, the error is gone. I'm using laravel 5.7.12. Any advice is highly appreciated. Thanks in advance!
Please or to participate in this conversation.