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.
--- 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.
thnx both @john5db & @ilkeruyank
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.