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