Skip to content

Allow setting custom options on a query [Fixes #541] #959

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
Sep 28, 2016

Conversation

hackel
Copy link
Contributor

@hackel hackel commented Sep 19, 2016

This adds an options method to the query builder to allow setting custom MongoDB options such as allowDiskUse which is required for sorting very large collections. E.g.:

$users = User::orderBy('name', 'desc')->options(['allowDiskUse' => true])->get();

Available options are documented here:
http://mongodb.github.io/mongo-php-library/classes/collection/#aggregate

@jenssegers jenssegers merged commit 0f2520f into mongodb:master Sep 28, 2016
mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
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