check()) { return auth()->user(); } elseif (auth('api')->check()) { return auth('api')->user(); } return null; } public static function check() { if (auth()->check() || auth('api')->check()) { return true; } return false; } }