PHPackages                             doshu/datatable - 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. doshu/datatable

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

doshu/datatable
===============

Datatable plugin for CakePHP

4.0.15(4y ago)13MITPHP

Since Aug 21Pushed 4y agoCompare

[ Source](https://github.com/doshu/cake_datatable)[ Packagist](https://packagist.org/packages/doshu/datatable)[ RSS](/packages/doshu-datatable/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (22)Used By (0)

Datatable plugin for CakePHP
============================

[](#datatable-plugin-for-cakephp)

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require doshu/datatable

```

The plugin is intended to be used in a standard cakephp 4.x application The tables are rendered using vue js 2, and generated with a class based configuration

Load the Datatable Helper
-------------------------

[](#load-the-datatable-helper)

```
$this->loadHelper('Datatable.Datatable')

```

Insert static files in the layout
---------------------------------

[](#insert-static-files-in-the-layout)

use the Datatable Helper fol loading static assets in the layout file create a global js variable named BASE\_UR with the application base url and a \_CSRF\_TOKEN variable with the CSRF TOKEN

```

    var BASE_URL = "";
    var _CSRF_TOKEN = "";

```

Define a datatable backend
--------------------------

[](#define-a-datatable-backend)

create a class in APP/src/Model/Datatable (the location can be changed) in this example we will create a datatable for showing all clients

```

```

see the example folder for all the available optiuons

Create the controller actions
-----------------------------

[](#create-the-controller-actions)

after defining the datatable model class, you can create the controller actions that will render the datatable and that will send the datat to the frontend

```
public function index()
{
    $datatable = new \App\Model\Datatable\ClientsDatatable(
        ['controller' => 'Clients', 'action' => 'datatable', '_ext' => 'json'], //set the action that the datatable will send requests to
        $this //controller instance
    );

    $this->set(compact('datatable'));
}

public function datatable() {
    //create the datatable instance in the same way as in the index action
    $datatable = new \App\Model\Datatable\ClientsDatatable(
        ['controller' => 'Clients', 'action' => 'datatable', '_ext' => 'json'],
        $this
    );
    //create the initial query and pass to the prepareCollection datatable method
    $clients = $this->Clients->find();
    //prepareCollection will apply all the filter and sorting to the collection and will set the result body to the response
    $datatable->prepareCollection($clients);
}

```

Render the datatable
--------------------

[](#render-the-datatable)

use the datatable helper to rendere the datatable wherever you want in the view file

```

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~50 days

Recently: every ~28 days

Total

20

Last Release

1516d ago

Major Versions

1.3 → 4.02020-06-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c193f85a29822fcdb196ac962c069789eb888bbb32404a52314aa993858568a?d=identicon)[doshu](/maintainers/doshu)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/doshu-datatable/health.svg)

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

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[dereuromark/cakephp-shim

A CakePHP plugin to shim applications between major framework versions.

401.0M11](/packages/dereuromark-cakephp-shim)[cakedc/cakephp-phpstan

CakePHP plugin extension for PHPStan.

40676.6k31](/packages/cakedc-cakephp-phpstan)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-geo

A CakePHP plugin around geocoding tools and helpers.

51174.9k4](/packages/dereuromark-cakephp-geo)

PHPackages © 2026

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