Hesto/multi-auth

Getting logged in user

Closed this issue · 3 comments

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();

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).