fix: add catch all route

This commit is contained in:
Andras Bacsai committed 2023-12-13 15:29:45 +01:00
1 parent 02c8b9f471
commit b06b465ffa
2 files changed
+8 -1

No files matched your search

+7
View File
@@ -240,3 +240,10 @@ Route::middleware(['auth'])->group(function () {
]);
})->name('destination.show');
});
Route::any('/{any}', function () {
if (auth()->user()) {
return redirect('/');
}
return redirect('/login');
})->where('any', '.*');