PHPackages                             kejawenlab/ci4pager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kejawenlab/ci4pager

ActiveProject[Utility &amp; Helpers](/categories/utility)

kejawenlab/ci4pager
===================

CodeIgniter 4 Pagination Library

1.1(5y ago)44074MITPHPPHP &gt;=7.2

Since Jul 16Pushed 5y ago3 watchersCompare

[ Source](https://github.com/KejawenLab/CI4Pager)[ Packagist](https://packagist.org/packages/kejawenlab/ci4pager)[ RSS](/packages/kejawenlab-ci4pager/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

CodeIgniter 4 Pagination Library
================================

[](#codeigniter-4-pagination-library)

Simple and Flexible Pagination Library for CodeIgniter 4

Requirement
-----------

[](#requirement)

- PHP 7.2 or above
- CodeIgniter v4

Installation
------------

[](#installation)

`composer req kejawenlab/ci4pager`

Usage
-----

[](#usage)

- From Query Result

```
// In your controller
use KejawenLab\CodeIgniter\Pagination\Paginator;

$results = $db->query('SELECT * FROM users');
$page = 1;

$paginator = Paginator::createFromResult($results, $page);

echo view('records', ['paginator' => $paginator]);

//In your view
foreach ($paginator->getResults() as $result) {
    //your result here
}

kejawenlab_ci4_pager($paginator, [
    'base_url' => 'http://base_url.com/users',
    'current_text' => 'Current Page',
    'total_text' => 'Total Records',
]);
```

- From Query Builder

```
// In your controller
use KejawenLab\CodeIgniter\Pagination\Paginator;

$queryBuilder = $db->table('users');
$page = 1;

$paginator = Paginator::createFromQueryBuilder($queryBuilder, $page);

echo view('records', ['paginator' => $paginator]);

//In your view
foreach ($paginator->getResults() as $result) {
    //your result here
}

kejawenlab_ci4_pager($paginator, [
    'base_url' => 'http://base_url.com/users',
    'current_text' => 'Current Page',
    'total_text' => 'Total Records',
]);
```

- From Array

```
// In your controller
use KejawenLab\CodeIgniter\Pagination\Paginator;

$results = $db->table('users')->get()->getResultArray();
$page = 1;

$paginator = Paginator::createFromArray($results, $page);

echo view('records', ['paginator' => $paginator]);

//In your view
foreach ($paginator->getResults() as $result) {
    //your result here
}

kejawenlab_ci4_pager($paginator, [
    'base_url' => 'http://base_url.com/users',
    'current_text' => 'Current Page',
    'total_text' => 'Total Records',
]);
```

Config Available
----------------

[](#config-available)

- `base_url`: required
- `current_text`: required
- `total_text`: required
- `use_get_param`: optional (default: true)
- `page_param`: when use `use_get_param` (default: page)
- `first_link_attr`: extra markup for first link (ex: `class="btn btn-success" id="first-page"`)
- `previous_link_attr`: extra markup for previous link
- `current_link_attr`: extra markup for current link
- `next_link_attr`: extra markup for next link
- `last_link_attr`: extra markup for last link
- `template_path`: optional (default: [template.tpl](src/template.tpl))

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~459 days

Total

2

Last Release

2127d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7464920?v=4)[Muhamad Surya Iksanudin](/maintainers/ad3n)[@ad3n](https://github.com/ad3n)

---

Top Contributors

[![ad3n](https://avatars.githubusercontent.com/u/7464920?v=4)](https://github.com/ad3n "ad3n (5 commits)")

---

Tags

codeignitercodeigniter-librarycodeigniter-paginationcodeigniter4codeigniter4-librarypagination

### Embed Badge

![Health badge](/badges/kejawenlab-ci4pager/health.svg)

```
[![Health](https://phpackages.com/badges/kejawenlab-ci4pager/health.svg)](https://phpackages.com/packages/kejawenlab-ci4pager)
```

###  Alternatives

[codeigniter4/appstarter

CodeIgniter4 starter app

1811.8M](/packages/codeigniter4-appstarter)[hermawan/codeigniter4-datatables

Serverside Datatables library for CodeIgniter4

10949.8k4](/packages/hermawan-codeigniter4-datatables)[abydahana/aksara

Aksara is a CodeIgniter based CRUD Toolkit you can use to build complex applications become shorter, secure and more reliable just in a few lines of code. Serving both CMS or Framework, produce both HEADLESS (RESTful API) or TRADITIONAL (Browser Based), just by writing single controller. Yet it's reusable, scalable and ready to use!

1121.2k](/packages/abydahana-aksara)[jason-napolitano/codeigniter4-cart-module

A basic port of the codeigniter 3 cart module for CodeIgniter 4.

5915.6k](/packages/jason-napolitano-codeigniter4-cart-module)[maniaba/asset-connect

AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application

1016.0k](/packages/maniaba-asset-connect)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
