update
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user