Skip to content
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

Add orderBy support to Builder #123

Merged
merged 1 commit into from
Nov 7, 2016
Merged

Conversation

damiantw
Copy link
Contributor

@damiantw damiantw commented Nov 6, 2016

Adds an orders property to Builder. Generally you'll want to order by relevancy but not always. This allows drivers to be more flexible with ordered queries.

@taylorotwell
Copy link
Member

Why would you not want to sort by relevance?

@damiantw
Copy link
Contributor Author

damiantw commented Nov 7, 2016

A person made a request on my Laravel Scout MySQL driver package (yabhq/laravel-scout-mysql-driver#4)

Looks like they wanted users to be able to search for products and sort them by price, but dates seems to be the use case that comes to mind. For example If one wanted to do a full text search on posts then sort by created_at so newer posts show first.

@taylorotwell taylorotwell merged commit 1a320db into laravel:master Nov 7, 2016
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