Laravel Ajax call showing 302 error/Response as response payload
This issue comes because of missing csrf token please add the below code if its not there.
1 2 3 4 5 |
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); |
1 |
<meta name="csrf-token" content="{{ csrf_token() }}" /> |