laravel csrf token ajax post
snippet in javascript

laravel csrf token ajax post

user1186

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

name csrf token laravel mismatch

user111

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