Skip to content

Conversation

alexandre-butynski
Copy link
Contributor

query->orderBy() should accept an uppercase parameter for the direction because it is the SQL convention and because it is the initial behavior in Laravel.

// Illuminate\Database\Query\Builder
public function orderBy($column, $direction = 'asc')
{
    $direction = strtolower($direction) == 'asc' ? 'asc' : 'desc';

    $this->orders[] = compact('column', 'direction');

    return $this;
}

jenssegers added a commit that referenced this pull request Dec 6, 2013
orderBy() should accept uppercase order direction
@jenssegers jenssegers merged commit 727f0e9 into mongodb:master Dec 6, 2013
@jenssegers
Copy link
Contributor

Thanks man!

mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
orderBy() should accept uppercase order direction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants