diff --git a/database/factories/Form/Models/FormFactory.php b/database/factories/Form/Models/FormFactory.php index 05c6ef16..e7d3d8fb 100644 --- a/database/factories/Form/Models/FormFactory.php +++ b/database/factories/Form/Models/FormFactory.php @@ -53,7 +53,7 @@ class FormFactory extends Factory */ public function sections(array $sections): self { - return $this->state(['config' => ['sections' => $sections]]); + return $this->state(['config' => ['sections' => array_map(fn ($section) => $section->create(), $sections)]]); } /**