Я получаю InvalidArgumentException Route [вход в систему] не определен ошибка здесь:
C: \ XAMPP \ HTDOCS \ Магазин \ поставщика \ Laravel \ Framework \ SRC \ Осветите \ Routing \ UrlGenerator.php
/**
* Get the URL to a named route.
*
* @param string $name
* @param mixed $parameters
* @param bool $absolute
* @return string
*
* @throws \InvalidArgumentException
*/
public function route($name, $parameters = [], $absolute = true)
{
if (! is_null($route = $this->routes->getByName($name))) {
return $this->toRoute($route, $parameters, $absolute);
}
throw new InvalidArgumentException("Route [{$name}] not defined.");
}
/**
* Get the URL for a given route instance.
*
* @param \Illuminate\Routing\Route $route
* @param mixed $parameters
* @param bool $absolute
* @return string
*
* @throws \Illuminate\Routing\Exceptions\UrlGenerationException
Это мой маршрут:
Route::group(['middleware' => ['auth']],function(){
route::get('/admin/dashboard','AdminController@dashboard');
});
Это мой метод:
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
}
else{
return redirect()->action('AdminController@login')->with('success','please login to access');
}
return $next($request);
}