Route login not defined

I am not sure why I am getting this error, when I logout from Filament.
[2023-05-10 19:16:52] local.ERROR: Route [login] not defined. {"exception":"[object] (Symfony\\Component\\Routing\\Exception\\RouteNotFoundException(code: 0): Route [login] not defined. at /Users/chris/Codes/leasing/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:467)
[stacktrace]
[2023-05-10 19:16:52] local.ERROR: Route [login] not defined. {"exception":"[object] (Symfony\\Component\\Routing\\Exception\\RouteNotFoundException(code: 0): Route [login] not defined. at /Users/chris/Codes/leasing/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:467)
[stacktrace]
Solution:
Try this in your web.php -> Route::get('/laravel/login', fn() => redirect(route('filament.auth.login')))->name('login');
Jump to solution
4 Replies
Dan Harrin
Dan Harrin15mo ago
because laravel expects a route with the name “login”. its dumb you need to create a /laravel/login route that redirects to the filament login, and call it “login”
williamdk.
williamdk.11mo ago
Hey, Dan! Can please write a sample of it here. Thanks.
Dan Harrin
Dan Harrin11mo ago
have you tried?
Solution
Husky110
Husky11011mo ago
Try this in your web.php -> Route::get('/laravel/login', fn() => redirect(route('filament.auth.login')))->name('login');