PHPackages                             michaelthedev/php-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. michaelthedev/php-datatables

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

michaelthedev/php-datatables
============================

PHP Helper for Datatables

v0.2(2y ago)06proprietaryPHPPHP &gt;=7.4

Since Jun 26Pushed 2y ago1 watchersCompare

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

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

PHP DataTablesHelper
====================

[](#php-datatableshelper)

About The Project
-----------------

[](#about-the-project)

PHP DataTablesHelper is a library that provides a helper class for managing DataTables in PHP. It allows you to set table callbacks and process requests to retrieve table data as JSON.

### Installation

[](#installation)

*How to install.*

1. Using composer

    ```
    composer require michaelthedev/php-datatables
    ```

    Include the generated autoload in your file, See index.php for example
2. If you prefer to include the DataTablesHelper file directly, you can follow these steps:

Download the DataTablesHelper.php file from the GitHub repository.

Include the DataTablesHelper file in your PHP file:

```
require_once 'path/to/DataTablesHelper.php';

use Michaelthedev\PhpDatatables\DataTablesHelper;
```

Usage
-----

[](#usage)

To use the DataTablesHelper class, follow these steps:

1. Include the DataTablesHelper class in your PHP file:

    ```
    use Michaelthedev\PhpDatatables\DataTablesHelper;
    ```
2. Create an instance of the DataTablesHelper class:

    ```
    $helper = new DataTablesHelper();
    ```
3. Set table callbacks using the `set` method. The table ID is a string identifier for your table, and the callback function should return the table data:

    ```
    $helper->set('tableIdHere', function () {
        // Your table data retrieval logic here
        return [
            ['col1' => 'val1', 'col2' => 'val2'],
            ['col1' => 'val3', 'col2' => 'val4'],
            // ...
        ];
    });
    ```
4. Process requests to retrieve table data by calling the `processTableRequest` method with the table ID:

    ```
    $helper->processTableRequest('tableIdHere');
    ```

    This will return the table data as JSON.
5. Optionally, you can retrieve the IDs of all the tables using the `getTableIds` method:

    ```
    $tableIds = $helper->getTableIds();
    ```

    This will return an array of table IDs that have been set.
6. See index.php for full usage example

Contributing
------------

[](#contributing)

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch
3. Commit your Changes
4. Push to the Branch
5. Open a Pull Request

### Built With

[](#built-with)

- [PHP](https://php.net/)

License
-------

[](#license)

This project is licensed under the [MIT License](LICENSE).

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

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

Total

2

Last Release

1054d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55f23d2b3b3943c0fdab8e8e5a86ec805a950017867d08b7a6a0ac74f780879a?d=identicon)[michaelthedev](/maintainers/michaelthedev)

---

Top Contributors

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

---

Tags

datatablesdatatables-serversidephp8

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michaelthedev-php-datatables/health.svg)

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

###  Alternatives

[eonasdan/bootstrap-datetimepicker

Date/time picker widget based on twitter bootstrap

7.2k492.4k9](/packages/eonasdan-bootstrap-datetimepicker)

PHPackages © 2026

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