Use Doctrine or Eloquent for Datatables' server-side processing.
Via Composer
$ composer require rougin/datatables
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.
use Rougin\Datatables\EloquentBuilder;
$model = 'Acme\Eloquent\Models\UserModel';
$builder = new EloquentBuilder($model, $_GET);
header('Content-Type: application/json');
echo json_encode($builder->make());
Please see CHANGELOG for more information what has changed recently.
$ composer require doctrine/orm illuminate/database --dev
$ composer test
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see LICENSE for more information.