/ database / factories / CorrectiveActionFactory.php
CorrectiveActionFactory.php
 1  <?php
 2  
 3  namespace Database\Factories;
 4  
 5  use App\Models\CorrectiveAction;
 6  use App\Models\Document;
 7  use Illuminate\Database\Eloquent\Factories\Factory;
 8  
 9  class CorrectiveActionFactory extends Factory
10  {
11      protected $model = CorrectiveAction::class;
12  
13      public function definition(): array
14      {
15          return [
16              'cause_analysis' => $this->faker->text(),
17              'correction' => $this->faker->text(),
18              'corrective_action' => $this->faker->text(),
19              'ca_plan_document_id' => Document::factory(),
20          ];
21      }
22  }