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

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

emagombe/datatable
==================

PHP Server-side processing datatable

v3.2.0(4y ago)1741MITPHP

Since Aug 13Pushed 3y ago1 watchersCompare

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

READMEChangelog (10)DependenciesVersions (13)Used By (0)

DataTable
=========

[](#datatable)

This lib allows to process DataTable data content from server-side using PHP

Instalation
-----------

[](#instalation)

### Using composer

[](#using-composer)

```
composer require emagombe/datatable
```

### Without composer

[](#without-composer)

**Clone** the project or **download** a release from And import autoload.php file to you project

```
require_once 'autoload.php';
```

Generating server-side data
---------------------------

[](#generating-server-side-data)

### from PDOStatement object

[](#from-pdostatement-object)

In the static method **create** pass the PDOStatement object then call the **build** object method to execute and return the output

```
use emagombe\DataTable;

$sql = "SELECT * FROM table;";
$stmt = $conn->prepare($sql);

$dt = DataTable::create($stmt)->build();
echo $dt;
```

### from Array

[](#from-array)

Same as above, pass a **array** to the static method **create** then call the **build** object method to execute and return the output

```
use emagombe\DataTable;

$array = [];
$dt = DataTable::create($array)->build();
echo $dt;
```

Streaming response
------------------

[](#streaming-response)

Use the **stream** method to print the response

```
DataTable::create($result)->stream();
```

Adding custom column
--------------------

[](#adding-custom-column)

Call the object method **addColumn** to add a custom column. This method receives the current **row** as parameter;

***Note***: The callback should return a **string** containing the custom content of the column!

```
$dt = DataTable::create($result)->addColumn("action", function($row) {
	return "".$row["name"]."";
})->build();
```

#### addColumn params

[](#addcolumn-params)

orderdata typefirststringsecondmethod

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

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

Recently: every ~104 days

Total

11

Last Release

1638d ago

Major Versions

v1.0.3 → v2.02020-08-16

v2.0 → 3.02020-09-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33861085?v=4)[Edson Magombe](/maintainers/emagombe)[@emagombe](https://github.com/emagombe)

---

Top Contributors

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

---

Tags

ajaxdatatabledatatable-serversidephpphpdatatableserver-side

### Embed Badge

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

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

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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