/** * @param $resource * @param RequestConfiguration $configuration * * @return View */ protected function buildView($resource, RequestConfiguration $configuration) { if (Response::HTTP_NO_CONTENT === $configuration->getResponseCode()) { $resource = null; } return View::create($resource, $configuration->getResponseCode()); }