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

Aggregate by time #57

Closed
nbertal opened this issue Oct 21, 2013 · 2 comments
Closed

Aggregate by time #57

nbertal opened this issue Oct 21, 2013 · 2 comments

Comments

@nbertal
Copy link

nbertal commented Oct 21, 2013

Hi there,
I just can't get to aggregate results by time.

Let's say I log errors in a MongoDB collection.
How can I group the number of errors per day (for example) ?

Thanks in advance.

@jenssegers
Copy link
Contributor

I think it would be better to use the raw() method in this case and use the native MongoCollection methods.

https://github.com/jenssegers/Laravel-MongoDB#raw-expressions

@nbertal
Copy link
Author

nbertal commented Oct 21, 2013

I tried this but the query failed.
I'm new to MongoDB so it's probably that I'm not using aggregation operators properly..
Thank you!

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