diff --git a/collections.md b/collections.md index 3396cd99e..cffe2dc78 100644 --- a/collections.md +++ b/collections.md @@ -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);