Skip to content

Commit 3c66f6c

Browse files
committed
support closures in sequences
1 parent 5fd4e39 commit 3c66f6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/Factories/Sequence.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __invoke()
4848
$this->index = 0;
4949
}
5050

51-
return tap($this->sequence[$this->index], function () {
51+
return tap(value($this->sequence[$this->index]), function () {
5252
$this->index = $this->index + 1;
5353
});
5454
}

0 commit comments

Comments
 (0)