PHPackages                             atsanna/codeigniter4-datatables - 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. atsanna/codeigniter4-datatables

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

atsanna/codeigniter4-datatables
===============================

DataTables support for CodeIgniter 4.2.x

7342[3 PRs](https://github.com/atsanna/codeigniter4-datatables/pulls)PHP

Since Mar 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/atsanna/codeigniter4-datatables)[ Packagist](https://packagist.org/packages/atsanna/codeigniter4-datatables)[ RSS](/packages/atsanna-codeigniter4-datatables/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

codeigniter4-datatables
=======================

[](#codeigniter4-datatables)

[![CodeIgniter 4.2.x](https://camo.githubusercontent.com/bad479f09bdec30b0e74148589d5e176e69e941453ef0db6e16b7cb5f86525be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d342e322e782d6f72616e67652e737667)](https://codeigniter.com/)[![Unit Tests](https://github.com/atsanna/codeigniter4-datatables/workflows/PHPUnit/badge.svg)](https://github.com/atsanna/codeigniter4-datatables/actions/workflows/phpunit.yml)[![Static Analysis](https://github.com/atsanna/codeigniter4-datatables/workflows/PHPStan/badge.svg)](https://github.com/atsanna/codeigniter4-datatables/actions/workflows/phpstan.yml)[![Architecture](https://github.com/atsanna/codeigniter4-datatables/workflows/Deptrac/badge.svg)](https://github.com/atsanna/codeigniter4-datatables/actions/workflows/deptrac.yml)[![Coverage Status](https://camo.githubusercontent.com/f94c0fbd108e422cce9991467a1fa0184cd2ba249cc679495b13aaf22a33423f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f617473616e6e612f636f646569676e69746572342d646174617461626c65732f62616467652e737667)](https://coveralls.io/github/atsanna/codeigniter4-datatables)[![GitHub license](https://camo.githubusercontent.com/13d456027b95c8d3af285afeb1e7cc6ba77b7a0d7790328edfab2f590617aaf8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f617473616e6e612f636f646569676e69746572342d646174617461626c6573)](https://github.com/atsanna/codeigniter4-datatables/blob/main/LICENSE)[![contributions welcome](https://camo.githubusercontent.com/9e93e892d0685e1bf7a1d0bd7c8410d6ecf2086a0a7b48dd58a6b96fa556ea2a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/atsanna/codeigniter4-datatables/pulls)

This is an extension for CodeIgniter 4.2.x to add Datatables support to your application.

Warning: this is a non-functional experimental version!
-------------------------------------------------------

[](#warning-this-is-a-non-functional-experimental-version)

The purpose is to generate the html table and the javascript function for its management with a few lines of code.

It is possible to define a model to be passed as a dependency in the constructor; this model will be used for the management of columns and queries.

```
    $userModel = new \atsanna\Models\UserModel();

    $table 	= new \atsanna\DataTables\Html\Table( $userModel );
```

There are many configuration possibilities:

- Enable or disable automatic calculation of column width
- Enable or disable deferred rendering for faster initialization speed
- Enable or disable the table information display field
- Enable or disable column sorting
- Enable or disable table pagination
- Layout button display options
- Enable or disable the display of a 'processing' indicator
- Enable horizontal scrolling
- Enable vertical scrolling
- Allow the table to shrink in height when a limited number of rows are displayed
- Ability to search (filter) feature control
- Enable or disable server side processing
- Enable or disable state saving
- Change the options in the page length selection list
- Set column specific initialization properties

The default configuration can be customized as follows:

```
    $table->getConfiguration()
            ->setPaging(true)
            ->setPagingType( 'full_numbers')
            ->setOrdering(true)
            ->setInfo(false)
            ->setSearching(true)
            ->setLengthMenu('[[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]')
            ->setAutoWidth(false)
            ->setScrollX(true);
```

It is possible to customize the rendering:

```
    $data = [
        'id'        => $userModel->table,
        'class'     => 'table table-striped table-bordered',
        'style'     => 'width: 100%; margin-left: auto; margin-right: auto;',
        'fields'    => $userModel->allowedFields,
    ];

    echo $table->render($data);
```

See the documentation
---------------------

[](#see-the-documentation)

[Documentation](https://atsanna.github.io/codeigniter4-datatables/)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3196de8896281429e70ceff65370e4d273bee5366aeb6e57415801d6430a7705?d=identicon)[atsanna](/maintainers/atsanna)

---

Top Contributors

[![atsanna](https://avatars.githubusercontent.com/u/119703?v=4)](https://github.com/atsanna "atsanna (168 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")

---

Tags

codeigniter-librarycodeigniter4datatablesdatatables-serverside

### Embed Badge

![Health badge](/badges/atsanna-codeigniter4-datatables/health.svg)

```
[![Health](https://phpackages.com/badges/atsanna-codeigniter4-datatables/health.svg)](https://phpackages.com/packages/atsanna-codeigniter4-datatables)
```

###  Alternatives

[sfolador/measures-for-laravel

A collection of unit conversions utils for Laravel

104.5k](/packages/sfolador-measures-for-laravel)

PHPackages © 2026

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