diff --git a/documentation.md b/documentation.md index dfff175..1414f38 100644 --- a/documentation.md +++ b/documentation.md @@ -71,6 +71,7 @@ - [Set Total Records](/docs/{{package}}/{{version}}/set-total-records) - [Set Filtered Records](/docs/{{package}}/{{version}}/set-filtered-records) - [Skip Paging](/docs/{{package}}/{{version}}/skip-paging) + - [Simple Pagination](/docs/{{package}}/{{version}}/simple-pagination) ### PLUGINS diff --git a/simple-pagination.md b/simple-pagination.md new file mode 100644 index 0000000..2910e0c --- /dev/null +++ b/simple-pagination.md @@ -0,0 +1,19 @@ +# Simple Pagination + +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. + + +## Example + + +```php +use DataTables; + +Route::get('user-data', function() { + $model = App\User::query(); + + return DataTables::eloquent($model) + ->simplePagination() + ->toJson(); +}); +```