*/ class ElectionFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { $pollingDate = now()->addWeeks(4)->toDateString(); return [ 'public_uuid' => (string) Str::uuid(), 'name' => 'Pilihanraya Negeri '.fake()->year(), 'code' => strtoupper(fake()->unique()->bothify('PRN-####')), 'status' => 'active', 'starts_at' => now()->toDateString(), 'polling_date' => $pollingDate, ]; } }