Answer the question
In order to leave comments, you need to log in
How to return the user to where he went to the login page from?
On pages for unlogged users, instead of the block with comments, there are links to /login and /register. After a successful login, I want to transfer back to the page from which they clicked on the login and switched to the login form.
Created a method in LoginController
protected function redirectTo()
{
return redirect()->intended('/');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question