use UserPaginate\Paginator; // Initialize the paginator $paginator = new Paginator($db->query('SELECT * FROM users'), $perPage = 10); // Get the records for the current page $records = $paginator->getCurrentPageRecords(); // Display the records foreach ($records as $record) { // code here to display each record } // Display the pagination links echo $paginator->getLinks();
use UserPaginate\Paginator; // Initialize the paginator $paginator = new Paginator($data, $perPage = 5); // Get the records for the current page $records = $paginator->getCurrentPageRecords(); // Display the records foreach ($records as $record) { // code here to display each record } // Display the pagination links echo $paginator->getLinks();The User paginate library is most likely a stand-alone library and not part of any package.