xxxxxxxxxx
// Csrf token setup
//paste this line in header of your file
<meta name="csrf-token" content="{{ csrf_token() }}" />
//add this code on the top of your js file
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});