| @@ 85-94 (lines=10) @@ | ||
| 82 | /** |
|
| 83 | * Loop through the rest of the columns to construct or where conditions. |
|
| 84 | */ |
|
| 85 | foreach ($conditionColumns as $column) |
|
| 86 | { |
|
| 87 | $column = 'LOWER(' . $column . ')'; |
|
| 88 | if (str_contains($column, '->')) |
|
| 89 | { |
|
| 90 | $column = $this->wrapJsonSelector($column); |
|
| 91 | } |
|
| 92 | ||
| 93 | $q->orWhere(\DB::raw($column), 'LIKE', '%' . strtolower($query) . '%'); |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * Loop through the model relations. |
|
| @@ 141-150 (lines=10) @@ | ||
| 138 | /** |
|
| 139 | * Loop through the rest of the columns to construct or where conditions. |
|
| 140 | */ |
|
| 141 | foreach ($subConditionColumns as $subConditionColumn) |
|
| 142 | { |
|
| 143 | $column = 'LOWER(' . $subConditionColumn . ')'; |
|
| 144 | if (str_contains($column, '->')) |
|
| 145 | { |
|
| 146 | $column = $this->wrapJsonSelector($column); |
|
| 147 | } |
|
| 148 | ||
| 149 | $q->orWhere(\DB::raw($column), 'LIKE', '%' . strtolower($query) . '%'); |
|
| 150 | } |
|
| 151 | }); |
|
| 152 | ||
| 153 | }); |
|