I have logged in using passport and API, now I want to access current user in web route. How can I get user details in a controller?
auth('api')->user();
Will you please try this?
public function __construct()
{
$this->middleware('auth');
$this->user = \Auth::user();
}