Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ The `keyBy` method keys the collection by the given key. If multiple items have

You may also pass a callback to the method. The callback should return the value to key the collection by:

$keyed = $collection->keyBy(function ($item) {
$keyed = $collection->keyBy(function ($item, $key) {
return strtoupper($item['product_id']);
});

Expand Down