PHP code example of prismo-smartpro / paginator

1. Go to this page and download the library: Download prismo-smartpro/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/ */

    

prismo-smartpro / paginator example snippets




martPRO\Technology\Paginator;

$test = new Test();

$paginator = new Paginator("https://github.dev/paginator/?page=");
$paginator->create($test->rowsCount(), 6);
$paginator->setNext("»");
$paginator->setPrev("«");

$data = $test->find()->limite($paginator->limite())->offset($paginator->offset())->fetch(true);

foreach ($data as $item){
   //continue
}

var_dump($paginator->currentPage());
//output = Página 1 de 7