| @@ 162-181 (lines=20) @@ | ||
| 159 | $globalKeyword |
|
| 160 | ); |
|
| 161 | } |
|
| 162 | } else { |
|
| 163 | if (count(explode('.', $columnName)) > 1) { |
|
| 164 | $eagerLoads = $this->getEagerLoads(); |
|
| 165 | $parts = explode('.', $columnName); |
|
| 166 | $relationColumn = array_pop($parts); |
|
| 167 | $relation = implode('.', $parts); |
|
| 168 | if (in_array($relation, $eagerLoads)) { |
|
| 169 | $this->compileRelationSearch( |
|
| 170 | $queryBuilder, |
|
| 171 | $relation, |
|
| 172 | $relationColumn, |
|
| 173 | $globalKeyword |
|
| 174 | ); |
|
| 175 | } else { |
|
| 176 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 177 | } |
|
| 178 | } else { |
|
| 179 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 180 | } |
|
| 181 | } |
|
| 182 | ||
| 183 | $this->isFilterApplied = true; |
|
| 184 | } |
|
| @@ 475-488 (lines=14) @@ | ||
| 472 | $keyword |
|
| 473 | ); |
|
| 474 | } |
|
| 475 | } else { |
|
| 476 | if (count(explode('.', $column)) > 1) { |
|
| 477 | $eagerLoads = $this->getEagerLoads(); |
|
| 478 | $parts = explode('.', $column); |
|
| 479 | $relationColumn = array_pop($parts); |
|
| 480 | $relation = implode('.', $parts); |
|
| 481 | if (in_array($relation, $eagerLoads)) { |
|
| 482 | $column = $this->joinEagerLoadedColumn($relation, $relationColumn); |
|
| 483 | } |
|
| 484 | } |
|
| 485 | ||
| 486 | $keyword = $this->getSearchKeyword($index); |
|
| 487 | $this->compileColumnSearch($index, $column, $keyword); |
|
| 488 | } |
|
| 489 | ||
| 490 | $this->isFilterApplied = true; |
|
| 491 | } |
|