Skip to content
Icon

WARNING You're browsing the documentation for an old version of LARAVEL-DATATABLES. Consider upgrading your project to laravel-datatables 11.0.

Query Builder Extension

Datatables instance allows you to proxy a database query call.

use Datatables;
 
Route::get('user-data', function() {
$model = App\User::query();
 
$dataTable = Datatables::eloquent($model);
$dataTable->where('company_id', 2);
 
return $dataTable->make(true);
});