Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php namespace Arcanedev\Support\Traits; |
||
28 | protected function paginate(Collection $data, Request $request, $perPage) |
||
29 | { |
||
30 | $page = $request->get('page', 1); |
||
31 | $path = $request->url(); |
||
32 | |||
33 | return new LengthAwarePaginator( |
||
34 | $data->forPage($page, $perPage), |
||
35 | $data->count(), |
||
36 | $perPage, |
||
37 | $page, |
||
38 | compact('path') |
||
39 | ); |
||
40 | } |
||
41 | } |
||
42 |