lundi 29 avril 2019

Custom Guard Authentication Exception

I created a custom guard (admin) in my application, and everything looks good following this tutorial online (https://pusher.com/tutorials/multiple-authentication-guards-laravel). The only problem is when i try to access a view that is protected by the admin guard, instead of giving me a exception NotAuthenticate, is giving me a "InvalidArgumentException Route [login] not defined.".

My Dashboard controller custom guard is:

 public function __construct()
    {
        $this->middleware('auth:admin');
    }

But the strange thing that i cant understand whats going on is that when i add in my web.php routes the "Auth::routes();", it works fine, the Exception NotAuthenticate gets fired.

Is there a reason why my custom only works has expected with i add the Auth::routes() ?



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2VxJThP
via IFTTT

Aucun commentaire:

Enregistrer un commentaire