diff --git a/src/Collection.php b/src/Collection.php index ccb210079..26f119382 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -519,7 +519,7 @@ public function get($key, $default = null): CollectionInterface */ public function getIterator(): Traversable { - return $this->innerIterator->getIterator(); + yield from $this->innerIterator->getIterator(); } public function group(): CollectionInterface