first
This commit is contained in:
27
database/factories/BahagianPilihanrayaFactory.php
Normal file
27
database/factories/BahagianPilihanrayaFactory.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\BahagianPilihanraya;
|
||||
use App\Models\Election;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<BahagianPilihanraya>
|
||||
*/
|
||||
class BahagianPilihanrayaFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'election_id' => Election::factory(),
|
||||
'code' => strtoupper(fake()->unique()->bothify('B##')),
|
||||
'name' => 'Bahagian '.fake()->city(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user