According to what I have read I have a security problem with the token.
I try putting this:
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
In my header I find this:
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
This throws me the following error:
Is there a way to verify that the token is loading properly?
Considering this:
It works for me sending in the following way:
Example:
I send it differently:
html
js
That happened to me today, the problem was a helper that I made. I didn't do something right in the names of the helper, I did the whole process again with a new name (I guess I changed the old one by hand) and the problem was solved.