public function paginator(PaginatorInterface $paginator)
    {
        $pagination = parent::paginator($paginator)['pagination'];

        return [
            'pagination' => [
                'count' => $pagination['count'],
                'total' => $pagination['total'],
                'perPage' => $pagination['per_page'],
                'currentPage' => $pagination['current_page'],
                'totalPages' => $pagination['total_pages'],
                'links' => $pagination['links'],
            ],
        ];
    }
public function paginator(PaginatorInterface $paginator)
    {
        $pagination = parent::paginator($paginator)['pagination'];

        return [
            'pagination' => [
                'count' => $pagination['count'],
                'total' => $pagination['total'],
                'perPage' => $pagination['per_page'],
                'currentPage' => $pagination['current_page'],
                'totalPages' => $pagination['total_pages'],
                'links' => $pagination['links'],
            ],
        ];
    }
public function paginator ( PaginatorInterface $ paginator ) { $ pagination = parent :: paginator ( $ paginator ) [ 'pagination' ] ; return [ 'pagination' => [ 'count' => $ pagination [ 'count' ] , 'total' => $ pagination [ 'total' ] , 'perPage' => $ pagination [ 'per_page' ] , 'currentPage' => $ pagination [ 'current_page' ] , 'totalPages' => $ pagination [ 'total_pages' ] , 'links' => $ pagination [ 'links' ] , ] , ] ; }
Format pagination data.

@param  \League\Fractal\Pagination\PaginatorInterface $paginator
@return array
Format pagination data .