vendredi 13 avril 2018

Laravel Blade - How to check for @auth of any guard

In my application I am trying to add "admin" users as well as "normal" users.
In order to do this I have created an additional admin Guard and UserProvider. This seems to log the user in under the 'admin' guard rather than the default 'web' guard.
Now, in my base template, I am trying to decide if the user is logged-in in order to decide if I should show the logout button. To do this I am checking @auth. But this only seems to work if a "normal" user is logged in.
Is there a way to check if a user is logged in under any guard?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire