Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Add a redirectTo middleware to the Filament dashboard
Browse files Browse the repository at this point in the history
🎨 Improve the `web` middleware syntax
  • Loading branch information
Log1x committed Jul 20, 2024
1 parent 943f091 commit b9b903b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->appendToGroup('web', [
$middleware->web([
App\Http\Middleware\AddSeoDefaults::class,
]);

$middleware->redirectTo(fn () => Filament\Pages\Dashboard::getUrl());
})
->withExceptions(function (Exceptions $exceptions) {
$exceptions->reportable(fn (Throwable $e) => $exceptions->handler->shouldReport($e) &&
Expand Down

0 comments on commit b9b903b

Please sign in to comment.