Is there a way on laravel eloquent to query like this:
select users.* from users group by name
to implement it on code:
Users::select('name')->groupBy('name')->get();
Now I need to get other details (columns) of the user. Is there a way to query without aggregating every column on the model, this will not work:
Users::select('users.*')->groupBy('name')->get();