| @@ 156-175 (lines=20) @@ | ||
| 153 | $this->request->keyword() |
|
| 154 | ); |
|
| 155 | } |
|
| 156 | } else { |
|
| 157 | if (count(explode('.', $columnName)) > 1) { |
|
| 158 | $eagerLoads = $this->getEagerLoads(); |
|
| 159 | $parts = explode('.', $columnName); |
|
| 160 | $relationColumn = array_pop($parts); |
|
| 161 | $relation = implode('.', $parts); |
|
| 162 | if (in_array($relation, $eagerLoads)) { |
|
| 163 | $this->compileRelationSearch( |
|
| 164 | $queryBuilder, |
|
| 165 | $relation, |
|
| 166 | $relationColumn, |
|
| 167 | $globalKeyword |
|
| 168 | ); |
|
| 169 | } else { |
|
| 170 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 171 | } |
|
| 172 | } else { |
|
| 173 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 174 | } |
|
| 175 | } |
|
| 176 | ||
| 177 | $this->isFilterApplied = true; |
|
| 178 | } |
|
| @@ 345-358 (lines=14) @@ | ||
| 342 | $keyword |
|
| 343 | ); |
|
| 344 | } |
|
| 345 | } else { |
|
| 346 | if (count(explode('.', $column)) > 1) { |
|
| 347 | $eagerLoads = $this->getEagerLoads(); |
|
| 348 | $parts = explode('.', $column); |
|
| 349 | $relationColumn = array_pop($parts); |
|
| 350 | $relation = implode('.', $parts); |
|
| 351 | if (in_array($relation, $eagerLoads)) { |
|
| 352 | $column = $this->joinEagerLoadedColumn($relation, $relationColumn); |
|
| 353 | } |
|
| 354 | } |
|
| 355 | ||
| 356 | $keyword = $this->getSearchKeyword($index); |
|
| 357 | $this->compileColumnSearch($index, $column, $keyword); |
|
| 358 | } |
|
| 359 | ||
| 360 | $this->isFilterApplied = true; |
|
| 361 | } |
|