1. Go to this page and download the library: Download jinnguyen/puja-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/ */
jinnguyen / puja-paginator example snippets
use Puja\Paginator\Paginator;
$paginator = new Paginator(
'/news/', // url
100, // total of records
10 // number of records per page
);
$paginator->addRenderer('simple', 'Puja\Paginator\Renderer\Simple'); // Puja\Paginator\Renderer\Simple must be extended of Puja\Paginator\Renderer\RendererAbstract
$paginator->setLabels($labes); // default $labels is [First, Prev, Next, Last]