@@ -115,11 +115,11 @@ |
||
| 115 | 115 | if (isset($criteria['search'])) { |
| 116 | 116 | foreach ($this->model->searchable as $method => $columns) { |
| 117 | 117 | if (method_exists($this->model, $method)) { |
| 118 | - $latest->orWhereHas($method, function ($query) use ($criteria, $columns) { |
|
| 118 | + $latest->orWhereHas($method, function($query) use ($criteria, $columns) { |
|
| 119 | 119 | /* @var $query Builder */ |
| 120 | - $query->where(function ($query2) use ($criteria, $columns) { |
|
| 120 | + $query->where(function($query2) use ($criteria, $columns) { |
|
| 121 | 121 | /* @var $query2 Builder */ |
| 122 | - foreach ((array)$columns as $column) { |
|
| 122 | + foreach ((array) $columns as $column) { |
|
| 123 | 123 | $query2->orWhere($column, 'like', '%' . $criteria['search'] . '%'); |
| 124 | 124 | } |
| 125 | 125 | }); |