Clarify groupBy docs

This commit is contained in:
Daniel Lo Nigro 2018-07-08 21:19:51 -07:00 committed by GitHub
parent 9a8fbf44d2
commit 26f7922c5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -740,7 +740,7 @@ The `groupBy` method groups the collection's items by a given key:
]
*/
In addition to passing a string `key`, you may also pass a callback. The callback should return the value you wish to key the group by:
Instead of passing a string `key`, you may pass a callback. The callback should return the value you wish to key the group by:
$grouped = $collection->groupBy(function ($item, $key) {
return substr($item['account_id'], -3);