*/ class BahagianPilihanrayaFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'election_id' => Election::factory(), 'code' => strtoupper(fake()->unique()->bothify('B##')), 'name' => 'Bahagian '.fake()->city(), ]; } }