src/League/Monga/Query/Find.php
public function orderBy($field, $direction = 1)
    {
        if (is_string($direction)) {
            $direction = $direction === 'asc' ? 1 : -1;
        }

        $this->orderBy[$field] = $direction;

        return $this;
    }
public function orderBy($field, $direction = 1)
    {
        if (is_string($direction)) {
            $direction = $direction === 'asc' ? 1 : -1;
        }

        $this->orderBy[$field] = $direction;

        return $this;
    }
public function orderBy ( $ field , $ direction = 1 ) { if ( is_string ( $ direction ) ) { $ direction = $ direction === 'asc' ? 1 : - 1 ; } $ this -> orderBy [ $ field ] = $ direction ; return $ this ; }
Orders a collection

@param  string $field       field to order by
@param  string $direction  asc/desc/1/-1

@return object             current instance
Orders a collection