| @@ 179-198 (lines=20) @@ | ||
| 176 | $globalKeyword |
|
| 177 | ); |
|
| 178 | } |
|
| 179 | } else { |
|
| 180 | if (count(explode('.', $columnName)) > 1) { |
|
| 181 | $eagerLoads = $this->getEagerLoads(); |
|
| 182 | $parts = explode('.', $columnName); |
|
| 183 | $relationColumn = array_pop($parts); |
|
| 184 | $relation = implode('.', $parts); |
|
| 185 | if (in_array($relation, $eagerLoads)) { |
|
| 186 | $this->compileRelationSearch( |
|
| 187 | $queryBuilder, |
|
| 188 | $relation, |
|
| 189 | $relationColumn, |
|
| 190 | $globalKeyword |
|
| 191 | ); |
|
| 192 | } else { |
|
| 193 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 194 | } |
|
| 195 | } else { |
|
| 196 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 197 | } |
|
| 198 | } |
|
| 199 | ||
| 200 | $this->isFilterApplied = true; |
|
| 201 | } |
|
| @@ 491-504 (lines=14) @@ | ||
| 488 | $keyword |
|
| 489 | ); |
|
| 490 | } |
|
| 491 | } else { |
|
| 492 | if (count(explode('.', $column)) > 1) { |
|
| 493 | $eagerLoads = $this->getEagerLoads(); |
|
| 494 | $parts = explode('.', $column); |
|
| 495 | $relationColumn = array_pop($parts); |
|
| 496 | $relation = implode('.', $parts); |
|
| 497 | if (in_array($relation, $eagerLoads)) { |
|
| 498 | $column = $this->joinEagerLoadedColumn($relation, $relationColumn); |
|
| 499 | } |
|
| 500 | } |
|
| 501 | ||
| 502 | $keyword = $this->getSearchKeyword($index); |
|
| 503 | $this->compileColumnSearch($index, $column, $keyword); |
|
| 504 | } |
|
| 505 | ||
| 506 | $this->isFilterApplied = true; |
|
| 507 | } |
|