You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Collection->groupBy accepts a list of fields to group by. If more than one field is passed, it uses the higher-order ->map->groupBy to recurse. This causes the return to change from being static to always being Illuminate\Support\Collection.
Also, there are extra levels of nesting for each additional field that is grouped on.
--level
used: 3Description
Collection->groupBy
accepts a list of fields to group by. If more than one field is passed, it uses the higher-order->map->groupBy
to recurse. This causes the return to change from beingstatic
to always beingIlluminate\Support\Collection
.Also, there are extra levels of nesting for each additional field that is grouped on.
Laravel code where the issue was found
Potential Fix
I've created this extension for my project, which appears to generate the correct return type for
groupBy
with multiple arguments.The text was updated successfully, but these errors were encountered: