File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 5353 - [Blacklist Columns](/docs/{{package}}/{{version}}/blacklist)
5454 - [Whitelist Columns](/docs/{{package}}/{{version}}/whitelist)
5555 - [Set Total Records](/docs/{{package}}/{{version}}/set-total-records)
56+ - [Set Filtered Records](/docs/{{package}}/{{version}}/set-filtered-records)
5657 - [Skip Paging](/docs/{{package}}/{{version}}/skip-paging)
5758
5859### PLUGINS
Original file line number Diff line number Diff line change 1+ # Set Filtered Records
2+
3+ In some cases, we need to manually set the filtered records count of our ` DataTables ` and skip its internal counting functionality.
4+ To achieve this, we can use ` setFilteredRecords($count) ` api.
5+
6+ ``` php
7+ use DataTables;
8+
9+ Route::get('user-data', function() {
10+ $model = App\User::query();
11+
12+ return DataTables::eloquent($model)
13+ ->setFilteredRecords(100)
14+ ->toJson();
15+ });
16+ ```
You can’t perform that action at this time.
0 commit comments