| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | protected function paginate($items, $perPage = 15) |
||
| 24 | { |
||
| 25 | $currentPage = LengthAwarePaginator::resolveCurrentPage(); |
||
| 26 | |||
| 27 | $currentPageItems = collect($items)->slice(($currentPage - 1) * $perPage, $perPage); |
||
| 28 | |||
| 29 | return new LengthAwarePaginator($currentPageItems, count($items), $perPage); |
||
| 30 | } |
||
| 31 | } |