$collection->group()
Groups the elements by a given field or callback function
Parameters
Name | Type | Default |
---|---|---|
$field * | string |Closure |
– |
$caseInsensitive | bool |
true |
Return type
Exceptions
Type | Description |
---|---|
Exception |
if $field is not a string nor a callback function |