| Total Complexity | 1 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Controller extends BaseController |
||
| 14 | { |
||
| 15 | use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
||
| 16 | |||
| 17 | protected function lengthAwarePaginator(Collection $collection, $itemsPerPage, $pageName) |
||
| 18 | { |
||
| 19 | $paginator = new LengthAwarePaginator( |
||
| 20 | $collection->forPage(Paginator::resolveCurrentPage($pageName), $itemsPerPage), |
||
| 21 | $collection->count(), |
||
| 22 | $itemsPerPage, |
||
| 23 | Paginator::resolveCurrentPage($pageName), |
||
| 24 | [ |
||
| 25 | 'path' => Paginator::resolveCurrentPath($pageName), |
||
| 26 | 'pageName' => $pageName |
||
| 27 | ]); |
||
| 28 | |||
| 29 | return $paginator; |
||
| 30 | } |
||
| 32 |