Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
25 | 36 | public function paginationResponse($items, $count) |
|
26 | { |
||
27 | 36 | $perPage = request()->input('per_page', 10); |
|
28 | 36 | $page = request()->input('page', 1); |
|
29 | |||
30 | 36 | return (new LengthAwarePaginator( |
|
31 | 36 | $items, |
|
32 | 36 | $count, |
|
33 | 36 | $perPage, |
|
34 | 36 | $page, |
|
35 | 36 | ['path' => url(request()->path())] |
|
36 | 36 | ))->appends('per_page', $perPage); |
|
37 | } |
||
39 |