I have a doubt, I'm using Laravel 5.8 and I have a component in Vue that is a simple registration form. When I submit the form via POST method, Laravel doesn't request me the CSRF token, is this a normal behavior? I'm not using the API routes.
I just noticed in the Chrome storage there is a XSRF-TOKEN.
So, how is now working the CSRF validation via ajax?
as mentioned in the laravel5.8
doc
When building JavaScript driven applications, it is convenient to have your JavaScript HTTP library automatically attach the CSRF token to every outgoing request. By default, the resources/js/bootstrap.js file registers the value of the csrf-token meta tag with the Axios HTTP library. If you are not using this library, you will need to manually configure this behavior for your application
for more information check laravel 5.8 csrf doc
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With