Open
Description
Hi,
i'm using this query
models_types::orderby('manufacturer_name')->groupby('manufacturer_name')->pluck('manufacturer_name','_id');
so that to get an array with these 2 fields. If i remove the groupby works fine but with it i get the error Unrecognized expression '$last'
With this query i want to retrieve distinct values of manufacturer_name in a collection that i have many documents with many manufacturers.
The issue comes up if i want to retrieve the object id.
I use
Laravel 6.2
PHP 7.3
MongoDB 4.2