Skip to content

Commit

Permalink
Fix Factory hasMany method (#38319)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Aug 10, 2021
1 parent 43ed474 commit c77fcbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Eloquent/Factories/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ public function createOne($attributes = [])
public function createMany(iterable $records)
{
return new EloquentCollection(
array_map(function ($record) {
collect($records)->map(function ($record) {
return $this->state($record)->create();
}, $records)
})
);
}

Expand Down

0 comments on commit c77fcbe

Please sign in to comment.