Skip to content

Commit acdd4df

Browse files
authored
Merge pull request #78 from lloricode/fast-paginate
fix fast paginate check installed, update readme for config
2 parents 0e572db + 44dc064 commit acdd4df

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,17 @@ return [
8585
'use_simple_pagination' => false,
8686

8787
/*
88-
* If you want to cursor pagination, set this to true.
88+
* If you want to use cursor pagination, set this to true.
8989
* This would override use_simple_pagination.
9090
*/
9191
'use_cursor_pagination' => false,
9292

93+
/*
94+
* use simpleFastPaginate() or fastPaginate from https://github.com/hammerstonedev/fast-paginate
95+
* use may installed it via `composer require hammerstone/fast-paginate`
96+
*/
97+
'use_fast_pagination' => false,
98+
9399
/*
94100
* Here you can override the base url to be used in the link items.
95101
*/

src/JsonApiPaginateServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function registerMacro()
4545
: (config('json-api-paginate.use_fast_pagination') ? 'fastPaginate' : 'paginate')
4646
);
4747

48-
if (config('json-api-paginate.use_simple_pagination') && !InstalledVersions::isInstalled('hammerstone/fast-paginate')) {
48+
if (config('json-api-paginate.use_fast_pagination') && !InstalledVersions::isInstalled('hammerstone/fast-paginate')) {
4949
abort(500, 'You need to install hammerstone/fast-paginate to use fast pagination.');
5050
}
5151

0 commit comments

Comments
 (0)