Conditions | 1 |
Paths | 1 |
Total Lines | 6 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | protected function paginate($items, $perPage = 15, $pageStart = 1) |
||
14 | { |
||
15 | $offSet = ($pageStart * $perPage) - $perPage; |
||
16 | $itemsForCurrentPage = array_slice($items, $offSet, $perPage, true); |
||
17 | $paginator = new LengthAwarePaginator($itemsForCurrentPage, count($items), $perPage, Paginator::resolveCurrentPage(), ['path' => Paginator::resolveCurrentPath()]); |
||
18 | return $paginator; |
||
19 | } |
||
49 |