Answer the question
In order to leave comments, you need to log in
How to fix login route in Laravel 5.7 middleware auth?
Hi guys,
How to fix InvalidArgumentException Route [login] not defined. ?
Initially Laravel 5.6 , updated to 5.7. But it didn't help. I deleted all the files where the word login is mentioned, but the problem remains. I pulled the Authenticate class from the new version of the neighboring project , where the method is specified:
protected function redirectTo($request)
{
return route('login');
}
Route::group([
'prefix' => 'provider',
'as' => 'provider.',
'namespace' => 'Provider',
'middleware' => ['auth', 'can:'.GatesHelper::PROVIDER_MANAGE],
],
Route::get('/login',function () {
return redirect(route('phone.login'));
})->name('login');
Answer the question
In order to leave comments, you need to log in
The problem is that somewhere in the view there is a link or a form action to {{ route('login') }} that is not defined in your web.php file, you need to fix it, or give the route a name - name('login' ) or [name=>login].
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question