Change Login/Register redirect path

Posted 7 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.

Reply to

Use Markdown with GitHub-flavored code blocks.