original_string: 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'],
                  ],
              ]);
          }
      }
code: 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'],
                  ],
              ]);
          }
      }
code_tokens: 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' ] , ] , ] ) ; } }
docstring: Set relation sort.
  
  @param string $column
docstring_tokens: Set relation sort .