0

I am currently having trouble getting the value of _id when I use either groupBy or distinct. The values of groupBy/distinct replaces the value of _id.

how do I use the library properly to achieve this?

here is the library https://github.com/jenssegers/laravel-mongodb

or if you can show me how to use PHP mongo's aggregate to correctly replicate the groupBy or Distinct behavior, that would be much appreciated. :)

Thank you very much!

4

0 回答 0