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