Skip to content
Discussion options

You must be logged in to vote

You need to create a raw aggregation and group by this fields. The type of this fields doesn't matter.

https://www.mongodb.com/docs/manual/reference/operator/aggregation/count/#behavior

With Laravel-mongodb, use the Model::raw()->aggregate() method.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Qu1eeeOJ
Comment options

@GromNaN
Comment options

@Qu1eeeOJ
Comment options

@GromNaN
Comment options

Answer selected by Qu1eeeOJ
@Qu1eeeOJ
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants