first
This commit is contained in:
33
database/factories/PusatMengundiFactory.php
Normal file
33
database/factories/PusatMengundiFactory.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Dun;
|
||||
use App\Models\PusatMengundi;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends Factory<PusatMengundi>
|
||||
*/
|
||||
class PusatMengundiFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$dun = Dun::factory()->create();
|
||||
|
||||
return [
|
||||
'election_id' => $dun->election_id,
|
||||
'dun_id' => $dun->id,
|
||||
'public_uuid' => (string) Str::uuid(),
|
||||
'code' => strtoupper(fake()->unique()->bothify('PM###')),
|
||||
'name' => 'SK '.fake()->city(),
|
||||
'address' => fake()->address(),
|
||||
'registration_url' => null,
|
||||
'qr_code_path' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user