Skip to content

Commit

Permalink
support closures in sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Feb 18, 2021
1 parent 5fd4e39 commit 3c66f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Factories/Sequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __invoke()
$this->index = 0;
}

return tap($this->sequence[$this->index], function () {
return tap(value($this->sequence[$this->index]), function () {
$this->index = $this->index + 1;
});
}
Expand Down

0 comments on commit 3c66f6c

Please sign in to comment.