Getting logged in user
Closed this issue · 3 comments
agent2020 commented
How do i get the logged in user in the multi auth i just created like i'll check the number user with (Auth::check())
Hesto commented
pick one of:
Auth::user();
Auth::guard()->user();
Auth::guard({guard})->user();
tucq88 commented
I think last option is more accurate Auth::guard({guard})->user();
Those upper solutions are only work with default guard configured in config/auth.php
Hesto commented
They work if you use proper middleware (not only with default guard).