I'm using ajax request in laravel and passing csrf token also but some times my application gets stuck and getting this error :
Code :
var formData = $(this).serialize();
$.ajaxSetup({
header:$('meta[name="_token"]').attr('content')
});
$.ajax({
url:$(this).attr('action'),
type:'POST',
data:formData,
headers: {
Accept: "application/json"
},
success:function(response) {
This form is in modal popup :
<form id="user-login" class="login" action="" method="post">
Any solution, Thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire