Skip to content

Doctrine/Eloquent wrapper for Datatables' server-side processing.

License

Notifications You must be signed in to change notification settings

NicolaPez/datatables

 
 

Repository files navigation

Datatables

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Use Doctrine or Eloquent for Datatables' server-side processing.

Install

Via Composer

$ composer require rougin/datatables

Usage

DoctrineBuilder

use Rougin\Datatables\DoctrineBuilder;

$entity = 'Acme\Doctrine\Models\User';

$builder = new DoctrineBuilder($manager, $entity, $_GET);

header('Content-Type: application/json');

echo json_encode($builder->make());

NOTE: $manager must return an instance of Doctrine\ORM\EntityManager. See DoctrineBuilderTest::setUp for the sample implementation.

EloquentBuilder

use Rougin\Datatables\EloquentBuilder;

$model = 'Acme\Eloquent\Models\UserModel';

$builder = new EloquentBuilder($model, $_GET);

header('Content-Type: application/json');

echo json_encode($builder->make());

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer require doctrine/orm illuminate/database --dev
$ composer test

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

About

Doctrine/Eloquent wrapper for Datatables' server-side processing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%