Fix SQL & Member Eloquent
This commit is contained in:
@@ -213,15 +213,25 @@ class Member extends Model
|
||||
$arr[] = $this->person->name_prefix;
|
||||
}
|
||||
|
||||
$arr[] = $this->person->name ?? '-';
|
||||
$arr[] = $this->person->name;
|
||||
|
||||
if (!empty($this->person->name_suffix)) {
|
||||
$arr[] = $this->person->name_suffix;
|
||||
}
|
||||
} else {
|
||||
if (!empty($this->name_prefix)) {
|
||||
$arr[] = $this->name_prefix;
|
||||
}
|
||||
|
||||
$arr[] = $this->name;
|
||||
|
||||
if (!empty($this->name_suffix)) {
|
||||
$arr[] = $this->name_suffix;
|
||||
}
|
||||
}
|
||||
|
||||
return Attribute::make(
|
||||
get: fn () => !empty($arr) ? ucwords(strtolower(implode(' ', $arr))) : null
|
||||
get: fn () => $arr ? ucwords(strtolower(implode(' ', $arr))) : null
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -227,6 +227,8 @@ class CorporateMemberService
|
||||
'id',
|
||||
'person_id',
|
||||
'member_id',
|
||||
'name_prefix',
|
||||
'name_suffix',
|
||||
'name',
|
||||
'members_effective_date',
|
||||
'members_expire_date',
|
||||
|
||||
Reference in New Issue
Block a user