vendredi 4 septembre 2015

laravel5.1 RoleMiddleware on a non-object

I try add to kernel RoleMiddleware from Laravel docs

When i'm not logged and i try to show page where RoleMiddleware is checked i see error:

FatalErrorException in RoleMiddleware.php line 19: Call to a member function hasRole() on a non-object

How i can check $request->user() is exist?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1JSon6b
via IFTTT

Aucun commentaire:

Enregistrer un commentaire