Skip to content

Files

Latest commit

 Cannot retrieve latest commit at this time.

History

History
16 lines (12 loc) · 384 Bytes

set-total-records.md

File metadata and controls

16 lines (12 loc) · 384 Bytes

Set Total Records

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

use Datatables;

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

	return Datatables::eloquent($model)
				->setTotalRecords(100)
				->make(true);
});