| @@ 158-177 (lines=20) @@ | ||
| 155 | $globalKeyword |
|
| 156 | ); |
|
| 157 | } |
|
| 158 | } else { |
|
| 159 | if (count(explode('.', $columnName)) > 1) { |
|
| 160 | $eagerLoads = $this->getEagerLoads(); |
|
| 161 | $parts = explode('.', $columnName); |
|
| 162 | $relationColumn = array_pop($parts); |
|
| 163 | $relation = implode('.', $parts); |
|
| 164 | if (in_array($relation, $eagerLoads)) { |
|
| 165 | $this->compileRelationSearch( |
|
| 166 | $queryBuilder, |
|
| 167 | $relation, |
|
| 168 | $relationColumn, |
|
| 169 | $globalKeyword |
|
| 170 | ); |
|
| 171 | } else { |
|
| 172 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 173 | } |
|
| 174 | } else { |
|
| 175 | $this->compileQuerySearch($queryBuilder, $columnName, $globalKeyword); |
|
| 176 | } |
|
| 177 | } |
|
| 178 | ||
| 179 | $this->isFilterApplied = true; |
|
| 180 | } |
|
| @@ 361-374 (lines=14) @@ | ||
| 358 | $keyword |
|
| 359 | ); |
|
| 360 | } |
|
| 361 | } else { |
|
| 362 | if (count(explode('.', $column)) > 1) { |
|
| 363 | $eagerLoads = $this->getEagerLoads(); |
|
| 364 | $parts = explode('.', $column); |
|
| 365 | $relationColumn = array_pop($parts); |
|
| 366 | $relation = implode('.', $parts); |
|
| 367 | if (in_array($relation, $eagerLoads)) { |
|
| 368 | $column = $this->joinEagerLoadedColumn($relation, $relationColumn); |
|
| 369 | } |
|
| 370 | } |
|
| 371 | ||
| 372 | $keyword = $this->getSearchKeyword($index); |
|
| 373 | $this->compileColumnSearch($index, $column, $keyword); |
|
| 374 | } |
|
| 375 | ||
| 376 | $this->isFilterApplied = true; |
|
| 377 | } |
|