PHPackages                             synergitech/fuel-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. synergitech/fuel-datatables

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

synergitech/fuel-datatables
===========================

v1.0.0(6y ago)01.5k1[1 issues](https://github.com/SynergiTech/fuel-datatables/issues)[1 PRs](https://github.com/SynergiTech/fuel-datatables/pulls)MITPHP

Since Nov 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/SynergiTech/fuel-datatables)[ Packagist](https://packagist.org/packages/synergitech/fuel-datatables)[ RSS](/packages/synergitech-fuel-datatables/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

FuelPHP DataTables
==================

[](#fuelphp-datatables)

[![Build status](https://camo.githubusercontent.com/525914c173d2cc3958a369fc22dc5a81f229af496ac7d4edbea3eb3e484aacbb/68747470733a2f2f6170692e7472617669732d63692e6f72672f53796e65726769546563682f6675656c2d646174617461626c65732e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/525914c173d2cc3958a369fc22dc5a81f229af496ac7d4edbea3eb3e484aacbb/68747470733a2f2f6170692e7472617669732d63692e6f72672f53796e65726769546563682f6675656c2d646174617461626c65732e7376673f6272616e63683d6d6173746572)

Implement DataTables with FuelPHP's ORM

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

[](#installation)

```
$ composer require synergitech/fuel-datatables

```

Basic Usage
-----------

[](#basic-usage)

You need to call the `setAllowedColumns()` function to define which columns can be accessed and returned.

```
class API extends Controller_Rest
{
  public function get_index()
  {
      $datatable = \SynergiTech\DataTables\DataTable::fromGet(\Model\YourModel::class);
      $datatable->setAllowedColumns([
         'id',
         'uuid',
         'name',
         'related_model.name',
         'created_at',
         'updated_at'
      ]);

      return $this->response($datatable->getResponse());
  }
}
```

### Customize query

[](#customize-query)

If you wish to do more complex ORM queries, you can simply call the `getQuery()` function which will return the FuelPHP ORM's query object, which you can then manipulate as you need to.

```
$datatable->getQuery()
   ->where('id', ">", 0)
   ->related("group")
   ->where("group.name", "!=", "guests")
   ->related("another_relation");
```

### Row formatters

[](#row-formatters)

You can provide custom callbacks that will be executed for each row to be returned in the response. You can use this to manipulate each row in the response.

```
$datatable->addRowFormatter(function ($model, $outputRow) {
    $outputRow['example'] = count($model->a_many_relation);
    return $outputRow;
});
```

### XSS filtering

[](#xss-filtering)

To make it easier for you to manage filtering your output, you can ask for all or specific rows to be encoded on output. By default, we leave XSS filtering up to you.

#### Escape all columns

[](#escape-all-columns)

```
$datatable->setEscapedColumns();
```

With exceptions:

```
$datatable->setEscapedColumns()
    ->setRawColumns(['html_body']);
```

#### Escape some columns

[](#escape-some-columns)

```
$datatable->setEscapedColumns(['id', 'slug']);
```

#### Turn off escaping

[](#turn-off-escaping)

```
$datatable->setEscapedColumns([]);
```

### Pre-requisites

[](#pre-requisites)

- [FuelPHP ORM (SynergiTech Fork)](https://github.com/SynergiTech/fuel-orm)
- jQuery
- DataTables

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 81.3% 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 ~103 days

Recently: every ~129 days

Total

6

Last Release

2205d ago

Major Versions

v0.0.5 → v1.0.02020-04-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/d69f33cc173ab9f35c67cb1bbaabeb0b705f983f65253393525ccfc539abc260?d=identicon)[SynergiTech](/maintainers/SynergiTech)

---

Top Contributors

[![Josh-G](https://avatars.githubusercontent.com/u/487384?v=4)](https://github.com/Josh-G "Josh-G (13 commits)")[![williamrenfrew](https://avatars.githubusercontent.com/u/12625062?v=4)](https://github.com/williamrenfrew "williamrenfrew (2 commits)")[![seanlanepgh](https://avatars.githubusercontent.com/u/23223170?v=4)](https://github.com/seanlanepgh "seanlanepgh (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/synergitech-fuel-datatables/health.svg)

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

PHPackages © 2026

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