Skip to content

Commit d642bba

Browse files
committed
Add simple pagination docs.
yajra/laravel-datatables#1911
1 parent 0e7bb37 commit d642bba

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

documentation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
- [Set Total Records](/docs/{{package}}/{{version}}/set-total-records)
7272
- [Set Filtered Records](/docs/{{package}}/{{version}}/set-filtered-records)
7373
- [Skip Paging](/docs/{{package}}/{{version}}/skip-paging)
74+
- [Simple Pagination](/docs/{{package}}/{{version}}/simple-pagination)
7475

7576
### PLUGINS
7677

simple-pagination.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Simple Pagination
2+
3+
Simple pagination aims to improve dataTables response time by skipping the total records count query and settings its value equals to the filtered total records.
4+
5+
6+
## Example
7+
8+
9+
```php
10+
use DataTables;
11+
12+
Route::get('user-data', function() {
13+
$model = App\User::query();
14+
15+
return DataTables::eloquent($model)
16+
->simplePagination()
17+
->toJson();
18+
});
19+
```

0 commit comments

Comments
 (0)