Closed sjorsvanleeuwen closed 3 years ago
Hi,
I think it would be a nice feature to provide the current iteration to the sequence callback function. This would enable code like this:
Carbon::setTestNow(Carbon::now()); $users = User::factory() ->count(4) ->sequence(function ($iterationCount) { return ['created_at' => Carbon::now()->subYear()->addDays($iterationCount)]; }) ->create();
I think this would provide a solid and more real dataset, which would provide help testing real world scenarios.
Feel free to open a PR
Hi,
I think it would be a nice feature to provide the current iteration to the sequence callback function. This would enable code like this:
I think this would provide a solid and more real dataset, which would provide help testing real world scenarios.