| @@ 178-197 (lines=20) @@ | ||
| 175 | $globalKeyword |
|
| 176 | ); |
|
| 177 | } |
|
| 178 | } else { |
|
| 179 | if (count(explode('.', $columnName)) > 1) { |
|
| 180 | $eagerLoads = $this->getEagerLoads(); |
|
| 181 | $parts = explode('.', $columnName); |
|
| 182 | $relationColumn = array_pop($parts); |
|
| 183 | $relation = implode('.', $parts); |
|
| 184 | if (in_array($relation, $eagerLoads)) { |
|
| 185 | $this->compileRelationSearch( |
|
| 186 | $queryBuilder, |
|
| 187 | $relation, |
|
| 188 | $relationColumn, |
|
| 189 | $globalKeyword |
|
| 190 | ); |
|
| 191 | } else { |
|
| 192 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 193 | } |
|
| 194 | } else { |
|
| 195 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 196 | } |
|
| 197 | } |
|
| 198 | ||
| 199 | $this->isFilterApplied = true; |
|
| 200 | } |
|
| @@ 464-477 (lines=14) @@ | ||
| 461 | $keyword |
|
| 462 | ); |
|
| 463 | } |
|
| 464 | } else { |
|
| 465 | if (count(explode('.', $column)) > 1) { |
|
| 466 | $eagerLoads = $this->getEagerLoads(); |
|
| 467 | $parts = explode('.', $column); |
|
| 468 | $relationColumn = array_pop($parts); |
|
| 469 | $relation = implode('.', $parts); |
|
| 470 | if (in_array($relation, $eagerLoads)) { |
|
| 471 | $column = $this->joinEagerLoadedColumn($relation, $relationColumn); |
|
| 472 | } |
|
| 473 | } |
|
| 474 | ||
| 475 | $keyword = $this->getSearchKeyword($index); |
|
| 476 | $this->compileColumnSearch($index, $column, $keyword); |
|
| 477 | } |
|
| 478 | ||
| 479 | $this->isFilterApplied = true; |
|
| 480 | } |
|