|
@@ 178-184 (lines=7) @@
|
| 175 |
|
private function compileGlobalQuery(QueryBuilder $query, array $columnConfiguration) |
| 176 |
|
{ |
| 177 |
|
foreach ($columnConfiguration as $i => $col) { |
| 178 |
|
if ($col->getSearch() == DefaultSearchable::NONE()) { |
| 179 |
|
// Don't do anything, this is not a searchable field |
| 180 |
|
} elseif ($col->getSearch() == DefaultSearchable::NORMAL()) { |
| 181 |
|
$query->orWhere($col->getName(), 'LIKE', '%' . $this->queryConfiguration->searchValue() . '%'); |
| 182 |
|
} else { |
| 183 |
|
throw new DatatableException('An unsupported DefaultSearchable was provided.'); |
| 184 |
|
} |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
return $query; |
|
@@ 207-213 (lines=7) @@
|
| 204 |
|
if (!isset($column)) |
| 205 |
|
continue; |
| 206 |
|
|
| 207 |
|
if ($column->getSearch() == DefaultSearchable::NONE()) { |
| 208 |
|
// Don't do anything, this is not a searchable field |
| 209 |
|
} elseif ($column->getSearch() == DefaultSearchable::NORMAL()) { |
| 210 |
|
$query->orWhere($col->columnName(), 'LIKE', '%' . $col->searchValue() . '%'); |
| 211 |
|
} else { |
| 212 |
|
throw new DatatableException('An unsupported DefaultSearchable was provided.'); |
| 213 |
|
} |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
return $query; |