public function collection($resourceKey, array $data) { $data = $this->reformatData($data); return parent::collection($resourceKey, $data); }
/** * Serialize the paginator. * * @param PaginatorInterface $paginator * * @return array */ public function paginator(PaginatorInterface $paginator) { $pagination = parent::paginator($paginator)['pagination']; $data = ['total' => $pagination['total'], 'count' => $pagination['count'], 'perPage' => $pagination['per_page'], 'currentPage' => $pagination['current_page'], 'totalPages' => $pagination['total_pages']]; return ['pagination' => $data]; }
/** * Serialize the paginator. * * @param PaginatorInterface $paginator * * @return array */ public function paginator(PaginatorInterface $paginator) { $data = parent::paginator($paginator); unset($data['pagination']['links']); return $data; }