diff --git a/src/Http/Responses/OAuthLoginResponse.php b/src/Http/Responses/OAuthLoginResponse.php index f761d24..68d2696 100644 --- a/src/Http/Responses/OAuthLoginResponse.php +++ b/src/Http/Responses/OAuthLoginResponse.php @@ -24,7 +24,6 @@ public function toResponse($request): RedirectResponse|FortifyLoginResponse config('socialstream.filament-route', 'filament.admin.pages.dashboard') ), $this->hasComposerPackage('laravel/jetstream') => $this->fortifyResponse($request), - $this->hasComposerPackage('laravel/breeze') => redirect()->route('dashboard'), default => $this->defaultResponse(), }; } @@ -40,6 +39,6 @@ private function defaultResponse(): RedirectResponse { return Socialstream::redirects('login') ? redirect()->intended(Socialstream::redirects('login')) - : redirect()->to(route('dashboard', absolute: false)); + : redirect()->to(config('socialstream.home')); } } diff --git a/src/Http/Responses/OAuthRegisterResponse.php b/src/Http/Responses/OAuthRegisterResponse.php index 61a4878..52ec0b5 100644 --- a/src/Http/Responses/OAuthRegisterResponse.php +++ b/src/Http/Responses/OAuthRegisterResponse.php @@ -25,7 +25,6 @@ public function toResponse($request): RedirectResponse|RegisterResponse config('socialstream.filament-route', 'filament.admin.pages.dashboard') ), $this->hasComposerPackage('laravel/jetstream') => $this->fortifyResponse($request), - $this->hasComposerPackage('laravel/breeze') => redirect()->route('dashboard'), default => $this->defaultResponse(), }; } @@ -41,6 +40,6 @@ private function defaultResponse(): RedirectResponse { return Socialstream::redirects('register') ? redirect()->intended(Socialstream::redirects('register')) - : redirect()->to(route('dashboard', absolute: false)); + : redirect()->to(config('socialstream.home')); } } diff --git a/src/Socialstream.php b/src/Socialstream.php index aff0ca6..b215175 100644 --- a/src/Socialstream.php +++ b/src/Socialstream.php @@ -122,7 +122,10 @@ public static function providers(): array */ public static function redirects(string $redirect, mixed $default = null) { - return config('socialstream.redirects.'.$redirect) ?? $default ?? config('socialstream.home'); + return config( + key: "socialstream.redirects.$redirect", + default: $default ?? config('socialstream.home') + ); } /**