@@ 23-27 (lines=5) @@ | ||
20 | $query = $model->where(function ($query) use ($repository) { |
|
21 | $firstColumn = array_shift($this->columns); |
|
22 | ||
23 | if (strpos($firstColumn, '.')) { |
|
24 | $query = $this->setRelationFieldCondition($query, $firstColumn, false); |
|
25 | } else { |
|
26 | $query = $query->where($firstColumn, 'LIKE', '%'.$this->queryString.'%'); |
|
27 | } |
|
28 | ||
29 | foreach ($this->columns as $column) { |
|
30 | if (strpos($column, '.')) { |
|
@@ 30-34 (lines=5) @@ | ||
27 | } |
|
28 | ||
29 | foreach ($this->columns as $column) { |
|
30 | if (strpos($column, '.')) { |
|
31 | $query = $this->setRelationFieldCondition($query, $column); |
|
32 | } else { |
|
33 | $query->orWhere($column, 'LIKE', '%'.$this->queryString.'%'); |
|
34 | } |
|
35 | } |
|
36 | }); |
|
37 |