/** * Display a listing of the resource. * * @return Response */ public function index() { try { $palettes = Palette::paginate($this->limit); return $this->respondOK(['data' => $this->transformer->transformArray($palettes->getItems()), 'meta' => $this->paginatorTransformer->transform($palettes)]); } catch (Exception $e) { return $this->respondBadRequest(); } }