Support the ongoing development of Laravel.io →
Requests Views Installation
Last updated 2 years ago.
0

Hi.

Why do you need the ajax call? Maybe you can make a form and submit via JS with de post parameters.

0

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-status-code-from-jquery-ajax

you can also set up jquery ajax globally so all 302 responses will auto redirect

0

Sign in to participate in this thread!

Eventy

Your banner here too?

tillka tillka Joined 25 Mar 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.