protected function setRelationSort($column)
    {
        list($relationName, $relationColumn) = explode('.', $column);

        if ($this->queries->contains(function ($query) use ($relationName) {
            return 'with' === $query['method'] && in_array($relationName, $query['arguments'], true);
        })) {
            $relation = $this->model->$relationName();

            $this->queries->push([
                'method' => 'join',
                'arguments' => $this->joinParameters($relation),
            ]);

            $this->resetOrderBy();

            $this->queries->push([
                'method' => 'orderBy',
                'arguments' => [
                    $relation->getRelated()->getTable().'.'.$relationColumn,
                    $this->sort['type'],
                ],
            ]);
        }
    }
protected function setRelationSort($column)
    {
        list($relationName, $relationColumn) = explode('.', $column);

        if ($this->queries->contains(function ($query) use ($relationName) {
            return 'with' === $query['method'] && in_array($relationName, $query['arguments'], true);
        })) {
            $relation = $this->model->$relationName();

            $this->queries->push([
                'method' => 'join',
                'arguments' => $this->joinParameters($relation),
            ]);

            $this->resetOrderBy();

            $this->queries->push([
                'method' => 'orderBy',
                'arguments' => [
                    $relation->getRelated()->getTable().'.'.$relationColumn,
                    $this->sort['type'],
                ],
            ]);
        }
    }
protected function setRelationSort ( $ column ) { list ( $ relationName , $ relationColumn ) = explode ( '.' , $ column ) ; if ( $ this -> queries -> contains ( function ( $ query ) use ( $ relationName ) { return 'with' === $ query [ 'method' ] && in_array ( $ relationName , $ query [ 'arguments' ] , true ) ; } ) ) { $ relation = $ this -> model -> $ relationName ( ) ; $ this -> queries -> push ( [ 'method' => 'join' , 'arguments' => $ this -> joinParameters ( $ relation ) , ] ) ; $ this -> resetOrderBy ( ) ; $ this -> queries -> push ( [ 'method' => 'orderBy' , 'arguments' => [ $ relation -> getRelated ( ) -> getTable ( ) . '.' . $ relationColumn , $ this -> sort [ 'type' ] , ] , ] ) ; } }
Set relation sort.

@param string $column
Set relation sort .