Download the PHP package nongbit/codeigniter-datatable without Composer

On this page you can find all versions of the php package nongbit/codeigniter-datatable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package codeigniter-datatable

CodeIgniter 4 DataTable

Server-side DataTables integration for CodeIgniter 4.
PHP only – you write your own frontend (plain JS, jQuery, or any tool).

Requirements

Installation

Usage

Use DataTableTrait (recommended) or instantiate DataTable directly.

Complex Queries (Where, Join, Group By, Order By)

You can modify the BaseBuilder before passing it to datatable(). All query conditions will be respected.

Example with WHERE and JOIN

Example with GROUP BY and HAVING

Example with Complex WHERE Conditions

Example with Raw SQL Conditions

Important: The package automatically adds LIMIT and OFFSET for pagination, and applies LIKE conditions for searching. It does not remove any existing WHERE, GROUP BY, HAVING, or ORDER BY clauses. However, if you specify an ORDER BY and DataTables sends its own ordering, both will be applied (your default ordering first, then DataTables ordering). To avoid conflicts, consider removing orderBy() from the builder if you want DataTables to fully control ordering.

Without Trait (Direct Instantiation)

Column Formatting with Callbacks

Use setCallback() to transform column data before sending to the frontend.

The callback receives $value (raw column value) and $row (full record array).

Important Notes

Troubleshooting

Ambiguous column name in ORDER BY

If you get an error like Column 'id' in order clause is ambiguous, set the name attribute in your DataTables column definition:

Custom search logic

The package uses LIKE for searching. If you need different logic (e.g., full-text search), extend the class or modify the builder before passing.

Bonus: Integration with Vite

If you use nongbit/codeigniter-vite, you can write your own datatable.js and import it into your Vite entry point. Example:

Then in your view: <?= vite('app') ?>.

This package provides no frontend assets; you are free to use CDN, Vite, or any other method.

License

MIT


All versions of codeigniter-datatable with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
codeigniter4/framework Version ^4.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nongbit/codeigniter-datatable contains the following files

Loading the files please wait ...