first
This commit is contained in:
25
database/factories/DunFactory.php
Normal file
25
database/factories/DunFactory.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user