complete story 15.1
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\PotentialClientType;
|
||||
use App\Models\PotentialClient;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class PotentialClientFactory extends Factory
|
||||
{
|
||||
protected $model = PotentialClient::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'type' => fake()->randomElement(PotentialClientType::cases()),
|
||||
'name' => fake()->name(),
|
||||
'phone' => fake()->phoneNumber(),
|
||||
'email' => fake()->safeEmail(),
|
||||
'address' => fake()->address(),
|
||||
'social_media' => fake()->url(),
|
||||
'website' => fake()->url(),
|
||||
'notes' => fake()->optional()->sentence(),
|
||||
];
|
||||
}
|
||||
|
||||
public function individual(): static
|
||||
{
|
||||
return $this->state(['type' => PotentialClientType::Individual]);
|
||||
}
|
||||
|
||||
public function company(): static
|
||||
{
|
||||
return $this->state(['type' => PotentialClientType::Company]);
|
||||
}
|
||||
|
||||
public function agency(): static
|
||||
{
|
||||
return $this->state(['type' => PotentialClientType::Agency]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user