laravel csrf ajax

78

laravel ajax csrf -

data: {
        "_token": "{{ csrf_token() }}",
        "id": id
        }

laravel meta csrf -

$.ajaxSetup({
   headers: {
     'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
   }
});

laravel csrf token ajax post -

$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});

name csrf token laravel mismatch -

<meta name="csrf-token" content="{{ csrf_token() }}" />

Comments

Submit
0 Comments