Why do you need the ajax call? Maybe you can make a form and submit via JS with de post parameters.
you need to tell jquery ajax what to do on specific http codes.
returning a redirect from the laravel controller will also send a 302 http code on the response,
read more about retrieving the http code from client side http://stackoverflow.com/questions/5344145/how-to-get-response...
you can also set up jquery ajax globally so all 302 responses will auto redirect
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.