Skip to content

[9.x] Improves Support\Collection each method type definition - #40879

Merged
nunomaduro merged 1 commit into
laravel:9.xfrom
zingimmick:fix-type-definition
Feb 9, 2022
Merged

[9.x] Improves Support\Collection each method type definition#40879
nunomaduro merged 1 commit into
laravel:9.xfrom
zingimmick:fix-type-definition

Conversation

@zingimmick

Copy link
Copy Markdown
Contributor

This pull request improves each() types because each also passes the key to the closure.

Example from Docs:

$collection->each(function ($item, $key) {
    //
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants