Total Complexity | 2 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
24 | class RequestCriteria implements CriteriaInterface |
||
25 | { |
||
26 | /** @var \Illuminate\Http\Request $request */ |
||
27 | protected $request; |
||
28 | /** @var \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\Illuminate\Database\Query\Builder $model */ |
||
29 | protected $model; |
||
30 | /** @var \Prettus\Repository\Contracts\RepositoryInterface $repository */ |
||
31 | protected $repository; |
||
32 | protected $search; |
||
33 | protected $searchData; |
||
34 | protected $searchFields; |
||
35 | protected $isFirstField = true; |
||
36 | protected $modelForceAndWhere; |
||
37 | protected $fieldsSearchable; |
||
38 | protected $fields; |
||
39 | protected $filter; |
||
40 | protected $orderBy; |
||
41 | protected $sortedBy; |
||
42 | protected $with; |
||
43 | protected $searchJoin; |
||
44 | protected $acceptedConditions; |
||
45 | protected $originalFields; |
||
46 | |||
47 | use ParseSearchableTrait; |
||
48 | use ParseOrderByTrait; |
||
49 | use ParseFilterTrait; |
||
50 | use ParseWithTrait; |
||
51 | |||
52 | public function __construct(Request $request) |
||
53 | { |
||
54 | $this->request = $request; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @param \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\Illuminate\Database\Query\Builder $model |
||
59 | * @param \Prettus\Repository\Contracts\RepositoryInterface $repository |
||
60 | * @return mixed |
||
61 | * @throws \Exception |
||
62 | */ |
||
63 | public function apply($model, RepositoryInterface $repository) |
||
74 | } |
||
75 | } |
||
76 |