diff --git a/src/Http/Livewire/Auth/PasswordReset.php b/src/Http/Livewire/Auth/PasswordReset.php index 5c624f2..10c50bc 100644 --- a/src/Http/Livewire/Auth/PasswordReset.php +++ b/src/Http/Livewire/Auth/PasswordReset.php @@ -26,7 +26,7 @@ class PasswordReset extends Page implements HasForms public function mount(): void { if (Filament::auth()->check()) { - redirect()->intended(Filament::getUrl()); + redirect()->intended(Filament::getCurrentPanel()->getUrl()); } if (session('status')) { diff --git a/src/Http/Livewire/Auth/RequestPasswordReset.php b/src/Http/Livewire/Auth/RequestPasswordReset.php index 642c976..25ef238 100644 --- a/src/Http/Livewire/Auth/RequestPasswordReset.php +++ b/src/Http/Livewire/Auth/RequestPasswordReset.php @@ -21,7 +21,7 @@ class RequestPasswordReset extends Page implements HasForms public function mount(): void { if (Filament::auth()->check()) { - redirect()->intended(Filament::getUrl()); + redirect()->intended(Filament::getCurrentPanel()->getUrl()); } if (session('status')) { diff --git a/src/Http/Responses/LoginResponse.php b/src/Http/Responses/LoginResponse.php index cbdba76..4ed9fff 100644 --- a/src/Http/Responses/LoginResponse.php +++ b/src/Http/Responses/LoginResponse.php @@ -17,6 +17,6 @@ public function toResponse($request) { return $request->wantsJson() ? response()->json(['two_factor' => false]) - : redirect()->intended(Filament::getUrl()); + : redirect()->intended(Filament::getCurrentPanel()->getUrl()); } } diff --git a/src/Http/Responses/TwoFactorChallengeViewResponse.php b/src/Http/Responses/TwoFactorChallengeViewResponse.php index 16c42d8..813f41d 100644 --- a/src/Http/Responses/TwoFactorChallengeViewResponse.php +++ b/src/Http/Responses/TwoFactorChallengeViewResponse.php @@ -15,6 +15,6 @@ class TwoFactorChallengeViewResponse implements LoginResponseContract */ public function toResponse($request) { - return redirect()->intended(Filament::getUrl()); + return redirect()->intended(Filament::getCurrentPanel()->getUrl()); } } diff --git a/src/Http/Responses/TwoFactorLoginResponse.php b/src/Http/Responses/TwoFactorLoginResponse.php index 9add8e6..13d3f3c 100644 --- a/src/Http/Responses/TwoFactorLoginResponse.php +++ b/src/Http/Responses/TwoFactorLoginResponse.php @@ -15,6 +15,6 @@ class TwoFactorLoginResponse implements LoginResponseContract */ public function toResponse($request) { - return redirect()->intended(Filament::getUrl()); + return redirect()->intended(Filament::getCurrentPanel()->getUrl()); } }