Answers for "laravel 8 419 unknown status"

PHP
1

419 unknown status

//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')
    }
});
Posted by: Guest on August-23-2021
1

419 unknown status ajax laravel

Use this in the head section:

<meta name="csrf-token" content="{{ csrf_token() }}">
and get the csrf token in ajax:

$.ajaxSetup({
  headers: {
    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  }
});
Posted by: Guest on January-13-2022
0

419 unknown status ajax laravel

<meta name="csrf-token" content="{{ csrf_token() }}">
Posted by: Guest on March-23-2022

Code answers related to "laravel 8 419 unknown status"

Browse Popular Code Answers by Language