mercredi 4 novembre 2015

Laravel 5 Auth - Change Login Route

I'm trying to redirect my user to 'homepage' after successful login.

I've been able to redirect after logout by adding the following to AuthController:

protected $redirectAfterLogout = 'homepage';

However, adding the following to AuthController does not work after login. It directs me to 'home."

protected $redirectPath = 'homepage';

I then changed the default redirect in the handle() function in RedirectIfAuthenticated to:

return redirect('homepage');

Not only does that not work, it gives me the following error:

This webpage has a redirect loop
ERR_TOO_MANY_REDIRECTS

Does anyone know how I can achieve redirecting to 'homepage' after login?

Thanks for any guidance!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire