Files
prn2026/database/factories/DunFactory.php
2026-06-03 08:51:22 +08:00

26 lines
494 B
PHP

<?php
namespace Database\Factories;
use App\Models\Dun;
use App\Models\Election;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Dun>
*/
class DunFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'election_id' => Election::factory(),
'code' => strtoupper(fake()->unique()->bothify('N##')),
'name' => fake()->city(),
];
}
}