-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjson-api-paginate.php
64 lines (52 loc) · 1.56 KB
/
json-api-paginate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
return [
/*
* The maximum number of results that will be returned
* when using the JSON API paginator.
*/
'max_results' => 30,
/*
* The default number of results that will be returned
* when using the JSON API paginator.
*/
'default_size' => 10,
/*
* The key of the page[x] query string parameter for page number.
*/
'number_parameter' => 'number',
/*
* The key of the page[x] query string parameter for page size.
*/
'size_parameter' => 'size',
/*
* The key of the page[x] query string parameter for cursor.
*/
'cursor_parameter' => 'cursor',
/*
* The name of the macro that is added to the Eloquent query builder.
*/
'method_name' => 'jsonPaginate',
/*
* If you only need to display Next and Previous links, you may use
* simple pagination to perform a more efficient query.
*/
'use_simple_pagination' => false,
/*
* If you want to use cursor pagination, set this to true.
* This would override use_simple_pagination.
*/
'use_cursor_pagination' => false,
/*
* use simpleFastPaginate() or fastPaginate from https://github.com/hammerstonedev/fast-paginate
* use may installed it via `composer require hammerstone/fast-paginate`
*/
'use_fast_pagination' => false,
/*
* Here you can override the base url to be used in the link items.
*/
'base_url' => null,
/*
* The name of the query parameter used for pagination
*/
'pagination_parameter' => 'page',
];