This commit is contained in:
pbao9
2026-02-11 11:18:35 +07:00
parent d59b2a0840
commit 6b6385f441
27 changed files with 386 additions and 30 deletions
+10
View File
@@ -57,6 +57,11 @@ class Customer extends Authenticatable
'first_name',
'last_name',
'point',
'gender_label',
];
protected $casts = [
'gender' => \App\Enums\Client\ClientGender::class,
];
/**
@@ -219,4 +224,9 @@ class Customer extends Authenticatable
{
return $this->belongsTo(Ward::class, 'ward_code', 'code');
}
public function getGenderLabelAttribute()
{
return $this->gender?->label() ?? 'Khác';
}
}