Ad

Auth::check() Is Not Working In Laravel

- 1 answer

I am using laravel5 and I want to return and API response after checking user is logged in or not.

But it seems Auth::check() is not working.

Ad

Answer

I think you are using token based authentication.

If you are using popular jwt-auth token based authentication, then you should use below code.

 $user = JWTAuth::parseToken()->authenticate();
Ad
source: stackoverflow.com
Ad