| @@ 105-114 (lines=10) @@ | ||
| 102 | /** |
|
| 103 | * Loop through the rest of the columns to construct or where conditions. |
|
| 104 | */ |
|
| 105 | foreach ($conditionColumns as $column) { |
|
| 106 | $column = 'LOWER('.$column.')'; |
|
| 107 | if (Str::contains($column, '->')) { |
|
| 108 | $column = $this->wrapJsonSelector($column); |
|
| 109 | } |
|
| 110 | ||
| 111 | $q->orWhere(\DB::raw($column), 'LIKE', '%'.strtolower($query).'%'); |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Loop through the model relations. |
|
| 116 | */ |
|
| 117 | foreach ($relations as $relation) { |
|
| @@ 154-163 (lines=10) @@ | ||
| 151 | /** |
|
| 152 | * Loop through the rest of the columns to construct or where conditions. |
|
| 153 | */ |
|
| 154 | foreach ($subConditionColumns as $subConditionColumn) { |
|
| 155 | $column = 'LOWER('.$subConditionColumn.')'; |
|
| 156 | if (Str::contains($column, '->')) { |
|
| 157 | $column = $this->wrapJsonSelector($column); |
|
| 158 | } |
|
| 159 | ||
| 160 | $q->orWhere(\DB::raw($column), 'LIKE', '%'.strtolower($query).'%'); |
|
| 161 | } |
|
| 162 | }); |
|
| 163 | }); |
|
| 164 | } |
|
| 165 | } |
|
| 166 | }); |
|