29 lines
753 B
PHP
29 lines
753 B
PHP
<?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]);
|
|
}
|
|
}
|