26 lines
494 B
PHP
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(),
|
|
];
|
|
}
|
|
}
|