Enhancement unauthenticated user url intended

This commit is contained in:
Cüneyt Şentürk 2026-02-26 17:49:00 +00:00
parent afb52a52f8
commit 9aed0937ab
1 changed files with 3 additions and 3 deletions

View File

@ -116,9 +116,9 @@ class Handler extends ExceptionHandler
*/ */
protected function unauthenticated($request, AuthenticationException $exception) protected function unauthenticated($request, AuthenticationException $exception)
{ {
// Store the current url in the session // Store the current url in the session (fullUrl includes query string)
if ($request->url() !== config('app.url')) { if ($request->fullUrl() !== config('app.url')) {
session(['url.intended' => $request->url()]); session(['url.intended' => $request->fullUrl()]);
} }
return $request->expectsJson() return $request->expectsJson()