protected function generatePaginationData($resources)
    {
        $paginationData = [
            'total'             => $resources->total(),
            'per_page'          => $resources->perPage(),
            'current_page'      => $resources->currentPage(),
            'last_page'         => $resources->lastPage(),
            'previous_page_url' => $resources->previousPageUrl(),
            'next_page_url'     => $resources->nextPageUrl(),
            'from'              => $resources->firstItem(),
            'to'                => $resources->lastItem()
        ];

        return $paginationData;
    }