Support the ongoing development of Laravel.io →
Authentication
Last updated 2 years ago.
0

There are many ways Simple is you can save last url in session while redirecting to login page & after successful login redirect back to saved url.

0

--- return redirect('auth/login'); +++return redirect()->guest('auth/login');

guest function will save a session as @john5db said. And you need return redirect()->intended() in your login function.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

arctushar arctushar Joined 5 Oct 2014

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.