Skip to content

Commit 3f148bf

Browse files
authored
Merge pull request laravel#5436 from JosephSilber/tap-each-lazy
[6.0] Add comment to clarify that tapEach() is lazy
2 parents 848ea6a + fea7bb7 commit 3f148bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

collections.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,6 +2647,8 @@ While the `each` method calls the given callback for each item in the collection
26472647
dump($value);
26482648
});
26492649

2650+
// Nothing has been dumped so far...
2651+
26502652
$array = $lazyCollection->take(3)->all();
26512653

26522654
// 1

0 commit comments

Comments
 (0)