Pagination/DataSetPagination.php
protected function getPages($totalPages, $currentPage)
    {
        $range = range(1, $totalPages);
        $pages = [];
        foreach ($range as $page) {
            $pages[] = [
                'number' => $page,
                'active' => (int)$page === (int)$currentPage
            ];
        }

        return $pages;
    }
protected function getPages($totalPages, $currentPage)
    {
        $range = range(1, $totalPages);
        $pages = [];
        foreach ($range as $page) {
            $pages[] = [
                'number' => $page,
                'active' => (int)$page === (int)$currentPage
            ];
        }

        return $pages;
    }
protected function getPages ( $ totalPages , $ currentPage ) { $ range = range ( 1 , $ totalPages ) ; $ pages = [ ] ; foreach ( $ range as $ page ) { $ pages [ ] = [ 'number' => $ page , 'active' => ( int ) $ page === ( int ) $ currentPage ] ; } return $ pages ; }
Returns an array containing all page numbers

@param int $totalPages
@param int $currentPage

@return array
Returns an array containing all page numbers