This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcursor_pagination.php
51 lines (48 loc) · 1.83 KB
/
cursor_pagination.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
<?php
return [
/*
|--------------------------------------------------------------------------
| Default results per page
|--------------------------------------------------------------------------
|
| If you don't specify a results per page, this value will be used.
| Remember that if you use an array instead of an integer, the first value
| of the array will be results per page when it's fetching previous, and
| the second one is for next and normal fetches.
*/
'per_page' => 15,
/*
|--------------------------------------------------------------------------
| Identifier name
|--------------------------------------------------------------------------
|
| The default identifier is 'id', or the model's primaryKey, but here
| it's the visible name.
| They will show up in the URL, and in the meta props.
|
| Cursor is more like it, but use whatever.
*/
'identifier_name' => 'cursor',
/*
|--------------------------------------------------------------------------
| Navigation Names
|--------------------------------------------------------------------------
|
| Customize the navigation names by changing the first element for the previous
| identifier and the second element for the next one.
|
| Examples: ['before', 'after'] , ['min', 'max']
*/
'navigation_names' => ['previous', 'next'],
/*
|--------------------------------------------------------------------------
| Transform Name
|--------------------------------------------------------------------------
|
| Specify a global function to be called to format the original snake_case.
| Can use Laravel's Helper functions.
|
| Examples: 'camel_case', 'kebab_case', 'snake_case'.
*/
'transform_name' => 'snake_case',
];