1. Go to this page and download the library: Download jasongrimes/paginator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Example of rendering the pagination control with the built-in template.
// See below for information about using other templates or custom rendering.
echo $paginator;
if ($paginator->getPrevUrl()):
echo $paginator->getPrevUrl();
endif;
foreach ($paginator->getPages() as $page):
if ($page['url']):
echo $page['isCurrent'] ? 'class="active"' : '';
echo $page['url'];
echo $page['num'];
else:
echo $page['num'];
endif;
endforeach;
if ($paginator->getNextUrl()):
echo $paginator->getNextUrl();
endif;
echo $paginator->getTotalItems();
echo $paginator->getCurrentPageFirstItem();
echo $paginator->getCurrentPageLastItem();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.