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

Feature request: orderBy()->where()->take()->get(); #3

Closed
mrusme opened this issue Jun 25, 2013 · 1 comment
Closed

Feature request: orderBy()->where()->take()->get(); #3

mrusme opened this issue Jun 25, 2013 · 1 comment

Comments

@mrusme
Copy link

mrusme commented Jun 25, 2013

Hi,

would it possible to allow combinations of orderBy with where? Something like this:

AnotherModel::orderBy('created_at', 'desc')->where('some_id', '=', new MongoID((string) $model->_id))->take(1)->get();

This would be really cool to have. Please correct me, if there already should be a feature like this available!

Thanks in advance!

@jenssegers
Copy link
Contributor

That should be possible already. It is tested here: https://github.com/jenssegers/Laravel-MongoDB/blob/master/tests/QueryTest.php#L154

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

No branches or pull requests

2 participants