1. Go to this page and download the library: Download tuum/pagination 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/ */
tuum / pagination example snippets
use Tuum\Pagination\Inputs;
use Tuum\Pagination\Pagination;
$pager = new Pager();
$pager->withRequest($request); // PSR-7 server request.
$inputs = $pager->getInputs();
$found = $pdo->prepare("SELECT * FROM tbl WHERE type=? and num>? OFFSET ? LIMIT ?")
->execute([
$inputs->get('type'),
$inputs->get('num'),
$inputs->getOffset(),
$inputs->getLimit(),
])
->fetchAll();