| @@ 131-148 (lines=18) @@ | ||
| 128 | $callback($builder, $keyword); |
|
| 129 | $query->addNestedWhereQuery($builder, 'or'); |
|
| 130 | } else { |
|
| 131 | if (count(explode('.', $columnName)) > 1) { |
|
| 132 | $eagerLoads = $this->getEagerLoads(); |
|
| 133 | $parts = explode('.', $columnName); |
|
| 134 | $relationColumn = array_pop($parts); |
|
| 135 | $relation = implode('.', $parts); |
|
| 136 | if (in_array($relation, $eagerLoads)) { |
|
| 137 | $this->compileRelationSearch( |
|
| 138 | $query, |
|
| 139 | $relation, |
|
| 140 | $relationColumn, |
|
| 141 | $keyword |
|
| 142 | ); |
|
| 143 | } else { |
|
| 144 | $this->compileQuerySearch($query, $columnName, $keyword); |
|
| 145 | } |
|
| 146 | } else { |
|
| 147 | $this->compileQuerySearch($query, $columnName, $keyword); |
|
| 148 | } |
|
| 149 | } |
|
| 150 | ||
| 151 | $this->isFilterApplied = true; |
|
| @@ 647-660 (lines=14) @@ | ||
| 644 | $builder = $this->query->newQuery(); |
|
| 645 | $callback($builder, $keyword); |
|
| 646 | $this->query->addNestedWhereQuery($builder); |
|
| 647 | } else { |
|
| 648 | if (count(explode('.', $column)) > 1) { |
|
| 649 | $eagerLoads = $this->getEagerLoads(); |
|
| 650 | $parts = explode('.', $column); |
|
| 651 | $relationColumn = array_pop($parts); |
|
| 652 | $relation = implode('.', $parts); |
|
| 653 | if (in_array($relation, $eagerLoads)) { |
|
| 654 | $column = $this->joinEagerLoadedColumn($relation, $relationColumn); |
|
| 655 | } |
|
| 656 | } |
|
| 657 | ||
| 658 | $keyword = $this->getColumnSearchKeyword($index); |
|
| 659 | $this->compileColumnSearch($index, $column, $keyword); |
|
| 660 | } |
|
| 661 | ||
| 662 | $this->isFilterApplied = true; |
|
| 663 | } |
|