Total Complexity | 2 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class PageScope implements Scope |
||
10 | { |
||
11 | /** |
||
12 | * @var int |
||
13 | */ |
||
14 | private $page; |
||
15 | /** |
||
16 | * @var int |
||
17 | */ |
||
18 | private $perPage; |
||
19 | |||
20 | /** |
||
21 | * PageScope constructor. |
||
22 | * @param int $page |
||
23 | * @param int $perPage |
||
24 | */ |
||
25 | public function __construct(int $page, int $perPage) |
||
26 | { |
||
27 | $this->page = $page; |
||
28 | $this->perPage = $perPage; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Apply the scope to a given Eloquent query builder. |
||
33 | * |
||
34 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
35 | * @param \Illuminate\Database\Eloquent\Model $model |
||
36 | * @return void |
||
37 | */ |
||
38 | public function apply(Builder $builder, Model $model) |
||
41 | } |
||
42 | } |
||
43 |