Laravel Post Ajax CSRF approprié
$.ajax({
url: '/postAjaxUrl',
type: 'POST',
dataType: 'json',
data: {user_id: 10},
success: function(response) {
console.log(response);
},
beforeSend: function (request) {
return request.setRequestHeader('X-CSRF-Token', $("meta[name='csrf-token']").attr('content'));
}
});
Wicked Wildebeest