Support the ongoing development of Laravel.io →
Views Architecture
Last updated 1 year ago.
0
Solution

The redirection should be done with javascript. You send your ajax call, if the returned data is successful you can redirect the user (window.location I think), if not you display the errors.

However a much better way would be to use a full javascript approach, backbone for example, without redirection, with every element of the page refreshing on a "authSuccess" event.

Last updated 1 year ago.
0

I used window.location.replace('/') its the best I can do with the constraints, I'm deviating somewhat from mvc with this but i'll only do the log in and register form with this method.

Thanks pmall

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

2akurate 2akurate Joined 13 May 2014

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.