I use Laravel 5.6, I have 2 auth guards :
'user' => [
'driver' => 'session',
'provider' => 'users',
],
'member' => [
'driver' => 'session',
'provider' => 'members',
],
In my template, I just have a little problem, I want to use @auth('user') for example to load correct view, but when I use @guest, a 'member' is considered as a guest, I explain :
In my blade :
@auth('user')
// content for user logged
@endauth
@auth('member')
// content for member logged
@endauth
@guest
// content for guest only
// but this content is shown for members logged (in addition of the @auth('member') content
@endguest
I don't know why, when a member is logged, he will see the @guest content and the @auth('member') content. Do I need to configure something else ? I want the same behavior of user auth.
** EDIT **
Ok, with this ugly way, it works :
@guest('member')
@guest('user')
// only guest
@endguest
@endguest
guest
will use. So theguest
call "could" be using neither guard you are checking, which means you will always have this section at the least in this example. sounds like what is currently the default guard does not have a logged in user. there is no general authenticated user or guest, it is always in relation to a guard ... in short, how do you know what guard theguest
check is using? – lagboxif ... elseif ... else
your conditional checks are dependent upon one another not separate – lagbox