*/ class OrderFactory extends Factory { /** * The name of the factory's corresponding model. * * @var class-string */ protected $model = Order::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'status' => fake()->randomElement(OrderStatus::cases()), 'total' => 0, ]; } }