authentication – In Laravel, how to redirect to target page after being intercepted to Login


I am new to Laravel and have inherited a site to maintain. I’m still learning, but I have been able to stumble through a lot of fixes and changes (picking up a lot along the way) with the help of boards like this. The site has public and private pages (guest & user). Each has a dashboard (or Home, if you prefer). If the user bookmarks a private page, the site correctly sends them to the login page. However, after login is complete, it redirects them to the dashboard. How can I change it so that they will be redirected to the page they initially sought (bookmarked) after they are logged in?

I have found a few posts on this topic that seemed like they would be relevant, but either the code samples they referenced didn’t resemble mine (at all), or it just didn’t work as they said it would, didn’t fix my problem.



Source link

Leave a Comment