protected function createArrayResponse($array, $key) { $response = [$key => $array]; return $this->createResponse($response); }