getUser($request), $resource)) { throw new AuthorizationFailedException(); } list($offset, $limit) = $this->getOffsetAndLimit(); return $this->getPaginatedContentResponse($resource->blocks->limit($offset, $limit), count($resource->blocks)); } }