#Route [login] not defined
10 messages · Page 1 of 1 (latest)
Check your routes/web.php
I suspect you have a welcome page at / still
no, I add defualt guard in serivce proverider to admin guard
add this in your AppServiceProvider register method.
config([
'auth.defaults.guard' => 'admin',
]);
Tht's a guard. what is in your web.php?
I don't have any routes in web.php to download file, I think that is a temporary solution, there is a depth problem that needs to be solved.
The main problem here is that I had the same problem and when I went deep into the files I saw that at some point it was controlling the web guard in a middleware (I don't remember which file it was in right now), which causes the problem mentioned when using a different guard.
I solved the problem by overriding the guard to update to “admin” if the request is coming from filament. Other than that, I haven't seen any solution or suggestion so far.
For this, I wrote a function that checks if there is a “filament” in the request and added it to the register in the AppServiceProvider file as;
if ($this->isRequestFromFilament()) {
config([
'auth.defaults.guard' => 'admin',
]);
}
It's just that the laravel default login route is /login but with filament we have only {panel}/login
so just add a route for login to redirect to the {panel}/login, e.g in the web.php:
foreach (filament()->getPanels() as $panel) {
Route::redirect('/login', $panel->getPath().'/login')->name('login');
}