Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 401 Bytes

set-filtered-records.md

File metadata and controls

16 lines (12 loc) · 401 Bytes

Set Filtered Records

In some cases, we need to manually set the filtered records count of our DataTables and skip its internal counting functionality. To achieve this, we can use setFilteredRecords($count) api.

use DataTables;

Route::get('user-data', function() {
	$model = App\User::query();

	return DataTables::eloquent($model)
				->setFilteredRecords(100)
				->toJson();
});