lundi 20 avril 2020

How to check current authentication guard and its guest in laravel blade template?

I am working on a Laravel Project. i have 2 authentication guards. This is the first time i am working with multiple authentication guard.

Usually on front end i use to separate code for Guest and Logged in Users as:

@guest
    //Data for Guest Users.   
@endguest

@auth
    //Data for Logged in Users.
@endauth

Now with multiple Guards, @guest is only false when i logged in to system with default guard. ie, @guest is active even when i am logged in through 'Admin Guard'. How can i check if a user is a guest for Admin Guard or if user logged in through Admin guard?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire