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

Well, the 'redirectPath()' method will first check for a property called 'redirectTo' and if not found, it will redirect to \home. That being said, you could naturally hack the core controller method, but I would not recommend it. Better to follow the guideline ;)

Check out that link (Chapter 'Password Reminders & Reset > Password Reminder Controller) http://laravel.com/docs/master/authentication

i.e. open Root/app/Http/Controllers/Auth/PasswordController.php and add the respective variable

protected $redirectTo = '/xy';

That should help.

Last updated 9 years ago.
0

I really don't know what I was thinking when I wrote that... but that was somewhat the solution, with one exception.

On my Auth\AuthController I simple needed to set the property:

protected $redirectPath = '/';

The AuthenticatesAndRegistersUsers trait has a method redirectPath that checks if that property exists. If that property is absent it will redirect to /home.

Thanks again!

0

Sorry for the confusion. But you got the idea.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.