public function order($field, $order = 'desc')
    {
        $field = $this->model->field($field);
        $order = $this->normalizeOrder($order);

        $this->builder->addOrderBy($this->connection->quoteIdentifier($field->mappedName()), $order);

        return $this;
    }
public function order($field, $order = 'desc')
    {
        $field = $this->model->field($field);
        $order = $this->normalizeOrder($order);

        $this->builder->addOrderBy($this->connection->quoteIdentifier($field->mappedName()), $order);

        return $this;
    }
public function order ( $ field , $ order = 'desc' ) { $ field = $ this -> model -> field ( $ field ) ; $ order = $ this -> normalizeOrder ( $ order ) ; $ this -> builder -> addOrderBy ( $ this -> connection -> quoteIdentifier ( $ field -> mappedName ( ) ) , $ order ) ; return $ this ; }
Adds sorting to query

@param string $field
@param string $order

@return $this
Adds sorting to query