Skip to content

muhtarudinsiregar/custom-pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Pagination Lib for Codeigniter


Installation

1. download from git or clone
2. extract file download
3. copy file CustomPagination.php to folder `applications/libraries`

Usage

1. Load Libraries

load libraries in your controller.

public function __construct()
    {
        parent::__construct();
        $this->load->library('custompagination');
    }

2. Call render()

$baseUrl    = 'backoffice/books';
$totalRows  = 100;

$data = [
    'pagination' => $this->custompagination->render($baseUrl, $totalRows)
];

 $this->load->view("Backoffice/Books/index.php", $data);

3. Call $pagination in view

 <p>
    <?php echo $pagination; ?>
</p>

Releases

No releases published

Packages

No packages published

Languages