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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user