*/ class EventFactory extends Factory { protected $model = Event::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'slug' => fake()->unique()->slug(), 'edition_year' => fake()->year(), 'event_type' => fake()->randomElement(['summit', 'seminar', 'other']), 'name' => fake()->sentence(3), 'theme' => fake()->sentence(), 'location_city' => fake()->city(), 'location_country' => fake()->country(), 'starts_at' => fake()->dateTimeBetween('now', '+1 year'), 'ends_at' => fake()->dateTimeBetween('+1 year', '+2 years'), 'mode' => fake()->randomElement(['online', 'presential', 'hybrid']), 'is_active' => true, ]; } }