Skip to content

orderBy() should accept uppercase order direction #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2013
Merged

orderBy() should accept uppercase order direction #80

merged 1 commit into from
Dec 6, 2013

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