src/QueryBuilder.php
public function orderByTranslated($column, $direction = 'asc')
    {
        $fallbackColumn = $this->qualifyTranslationColumn($column, true);
        $column = $this->qualifyTranslationColumn($column);

        if (!$this->model->shouldFallback()) {
            return $this->orderBy($column, $direction);
        }

        $condition = $this->compileIfNull($column, $fallbackColumn);

        return $this->orderByRaw("{$condition} {$direction}");
    }
public function orderByTranslated($column, $direction = 'asc')
    {
        $fallbackColumn = $this->qualifyTranslationColumn($column, true);
        $column = $this->qualifyTranslationColumn($column);

        if (!$this->model->shouldFallback()) {
            return $this->orderBy($column, $direction);
        }

        $condition = $this->compileIfNull($column, $fallbackColumn);

        return $this->orderByRaw("{$condition} {$direction}");
    }
public function orderByTranslated ( $ column , $ direction = 'asc' ) { $ fallbackColumn = $ this -> qualifyTranslationColumn ( $ column , true ) ; $ column = $ this -> qualifyTranslationColumn ( $ column ) ; if ( ! $ this -> model -> shouldFallback ( ) ) { return $ this -> orderBy ( $ column , $ direction ) ; } $ condition = $ this -> compileIfNull ( $ column , $ fallbackColumn ) ; return $ this -> orderByRaw ( "{$condition} {$direction}" ) ; }
Add an "order by" clause by translated column to the query.

@param  string  $column
@param  string  $direction
@return $this
Add an order by clause by translated column to the query .