Skip to content

Commit

Permalink
[6.x] Fix ConfirmsFilament trait (#365)
Browse files Browse the repository at this point in the history
* fix trait

* simplify approach
  • Loading branch information
joelbutcher authored Jul 25, 2024
1 parent 546a74d commit 966b8df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Concerns/ConfirmsFilament.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public function cameFromFilamentAuthRoute(): bool
{
$previousRoute = Session::get('socialstream.previous_url');

return in_array($previousRoute, [
route('filament.auth.login'),
route('filament.admin.auth.login'),
route('filament.auth.register'),
route('filament.admin.auth.register'),
]);
return in_array($previousRoute, array_filter([
Route::has('filament.auth.login') ? route('filament.auth.login') : null,
Route::has('filament.admin.auth.login') ? route('filament.admin.auth.login') : null,
Route::has('filament.auth.register') ? route('filament.auth.register') : null,
Route::has('filament.admin.auth.register') ? route('filament.admin.auth.register') : null,
]));
}

public function hasFilamentLoginRoutes(): bool
Expand Down

0 comments on commit 966b8df

Please sign in to comment.