Return json response in ajax request laravel – Jquery ajax
I have the following ajax code in my frontend. var formData = $('#application-information-step-one').serialize(); var actionUrl = $('#application-information-step-one').attr('action'); $.ajax({ url: actionUrl, type: 'POST', data: formData, success: function(data) { var resp = JSON.stringify(data); console.log(resp); }, error: function(data) { } And following code…