From 3c66f6cda2ac4ee2844a67fc98e676cb170ff4b1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 18 Feb 2021 10:16:56 -0600 Subject: [PATCH] support closures in sequences --- src/Illuminate/Database/Eloquent/Factories/Sequence.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Factories/Sequence.php b/src/Illuminate/Database/Eloquent/Factories/Sequence.php index 20c0f3357c68..545a248f6362 100644 --- a/src/Illuminate/Database/Eloquent/Factories/Sequence.php +++ b/src/Illuminate/Database/Eloquent/Factories/Sequence.php @@ -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; }); }