complete story 15.1

This commit is contained in:
Naser Mansour
2026-01-09 18:45:17 +02:00
parent 5803410584
commit 959cc0e717
9 changed files with 338 additions and 9 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Enums;
enum PotentialClientType: string
{
case Individual = 'individual';
case Company = 'company';
case Agency = 'agency';
public function label(): string
{
return match ($this) {
self::Individual => __('potential-clients.types.individual'),
self::Company => __('potential-clients.types.company'),
self::Agency => __('potential-clients.types.agency'),
};
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use App\Enums\PotentialClientType;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class PotentialClient extends Model
{
use HasFactory;
protected $fillable = [
'type',
'name',
'phone',
'email',
'address',
'social_media',
'website',
'notes',
];
protected function casts(): array
{
return [
'type' => PotentialClientType::class,
];
}
}