agungsugiarto/codeigniter-datables

jQuery DataTables API for codeigniter3

1.x-dev 2022-01-30 05:20 UTC

This package is auto-updated.

Last update: 2024-11-06 22:21:51 UTC


README

This package is created to handle server-side works of DataTables jQuery Plugin via AJAX option by using Eloquent ORM, Fluent Query Builder or Collection.

return datatables()->of(User::query())->toJson();
return datatables()->of(DB::table('users'))->toJson();
return datatables()->of(User::all())->toJson();

return datatables()->eloquent(User::query())->toJson();
return datatables()->query(DB::table('users'))->toJson();
return datatables()->collection(User::all())->toJson();

return datatables(User::query())->toJson();
return datatables(DB::table('users'))->toJson();
return datatables(User::all())->toJson();

Requirements

Documentations

DataTables 8.x Upgrade Guide

There are breaking changes since DataTables v8.x. If you are upgrading from v7.x to v8.x, please see upgrade guide.

Quick Installation

$ composer require agungsugiarto/codeigniter-datatabless:"1.x-dev"

Configuration

Copy datatables.php from vendor/agungsugiarto/codeigniter-datatables/src/config/datatables.php to folder application/config/

And that's it! Start building out some awesome DataTables!

Debugging Mode

To enable debugging mode, just set ENVIROTMENT to development and the package will include the queries and inputs used when processing the table.

It is advised to use Homestead or Valet when working with the package.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email me.agungsugiarto@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.