//It's an error of csrf token, there is multiples ways to fix it, too much to
//write a grepper answer on.
//419 : error of csrf token
//Common way to fix it, try this
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
You are using laravel as backend and React as frontend or otherwise
solution:
1. Just rewrite your top domain on to match themselves.
example:
(laravel) http://localhost:8000 and (react) http://localhost:3000/
or
(laravel) http://127.0.0.1:8000 and (react) http://127.0.0.1:3000/
2. "Accept: application/json" to headers [optional depending on your client service]