Route [login] not defined

前端 未结 14 1899
無奈伤痛
無奈伤痛 2020-12-02 15:15

Trying to play with Laravel today for the first time. I am getting the following error when I attempt to visit localhost/project/public:

InvalidArgume

14条回答
  •  無奈伤痛
    2020-12-02 15:47

    Try this method:

    look for this file

    "RedirectifAuthenticated.php"

    update the following as you would prefer

     if (Auth::guard($guard)->check()) {
       return redirect('/');
     }
    

    $guard as an arg will take in the name of the custom guard you have set eg. "admin" then it should be like this.

    if (Auth::guard('admin')->check()) {
      return redirect('/admin/dashboard');
    }else{
      return redirect('/admin/login');
    }
    

提交回复
热议问题