headers->get('Authorization')); $authorization = Cache::get('BBC-' . $token, false); if(!$authorization) { throw new UnauthorizedHttpException('You are not logged in'); } $user = $authorization['User']; Auth::setUser($user); return $next($request); } }