1. Go to this page and download the library: Download lampager/lampager-cakephp2 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/ */
lampager / lampager-cakephp2 example snippets
// Be sure to ::load() will fail unless autoloader is properly configured.
CakePlugin::load('Lampager');
class AppModel extends Model
{
public $actsAs = [
'Lampager.Lampager',
];
}
// If there is a previous page, print pagination link
if ($posts->hasPrevious) {
echo $this->Html->link('<< Previous', [
'controller' => 'posts',
'action' => 'index',
'previous_cursor' => $posts->previousCursor,
]);
}
// If there is a next page, print pagination link
if ($posts->hasNext) {
echo $this->Html->link('Next >>', [
'controller' => 'posts',
'action' => 'index',
'next_cursor' => $posts->nextCursor,
]);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.