Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function apply(Builder $builder, Model $model) |
||
28 | { |
||
29 | foreach ($this->contexts as $context => $methodName) { |
||
30 | $param = config("queryScope.inNotIn.{$context}", $context); |
||
31 | |||
32 | $context = $this->hasArray($this->request->get($param, null)); |
||
33 | |||
34 | if (count($context) > 0) { |
||
35 | $builder = $builder->{$methodName}($model->getKeyName(), $context); |
||
36 | } |
||
37 | } |
||
38 | |||
39 | return $builder; |
||
40 | } |
||
41 | } |
||
42 |