*/ final class AnswerFactory extends Factory { protected $model = Answer::class; /** * Define the model's default state. */ public function definition(): array { return [ 'session_id' => Session::factory(), 'question_id' => Question::factory(), 'value' => fake()->randomElement(['yes', 'no', 'not_applicable']), 'text_value' => null, ]; } }