first commit
This commit is contained in:
28
database/factories/ConsultantFactory.php
Normal file
28
database/factories/ConsultantFactory.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Consultant;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ConsultantFactory extends Factory
|
||||
{
|
||||
protected $model = Consultant::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'nama_perunding' => fake()->company().' Sdn Bhd',
|
||||
'no_pendaftaran_syarikat' => fake()->numerify('20########').' ('.fake()->numerify('#######-A').')',
|
||||
'alamat' => fake()->address(),
|
||||
'emel' => fake()->unique()->safeEmail(),
|
||||
'telefon' => fake()->numerify('07-#######'),
|
||||
'aktif' => true,
|
||||
];
|
||||
}
|
||||
|
||||
public function tidakAktif(): static
|
||||
{
|
||||
return $this->state(fn () => ['aktif' => false]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user