I am currently getting a response of 302 found when I process the AJAX. I understand I need to work with JSON in the controller but I am unable to get anything to even console log.
The AJAX is as follows:
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$.ajax({
type : type,
url : url,
data : data,
dataType : 'json'
})
.done(function(data) {
console.log(data);
});
});
i.submit();
});
});
Network Repsonse