Change Login/Register redirect path

Posted 2 months ago by pickab00

So I did change it from /home to /portal. I changed it here:

protected function authenticated(Request $request, $user)
        return redirect('/portal');

And for register, here:

return $this->registered($request, $user)
                        ?: redirect('/portal');

For some reason, this does not work for me:

protected $redirectTo = '/portal';

And now the thing is, When I login/register, it redirects me to /portal just fine. But when I am logged in and if I type /login or /register on the URL bar, it redirects me to /home. I am not able to find where this is exactly happening. And an explanation would be greatly appreciated!

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.