Files
KarbonDatacenter/database/factories/ConsultantFactory.php
2026-06-24 20:32:14 +08:00

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]);
}
}