*/ final class ProcessFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Process::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'user_id' => fake()->randomElement(User::pluck('id')), 'watch_type' => \collect(WatchTypeEnum::toArray())->random()->value, 'supplier' => fake()->word, 'name' => fake()->name, 'description' => fake()->text, 'origin' => \collect(OriginEnum::toArray())->random()->value, 'is_test_machine' => fake()->boolean, 'is_quotation' => fake()->boolean, 'quotation_document' => fake()->word, 'profit' => \collect(BenefitEnum::toArray())->random()->value, 'observation' => fake()->word, 'picture' => [fake()->word], 'documents' => [fake()->word], 'url' => fake()->url, 'deleted_at' => fake()->dateTime(), ]; } }