update ecard dan daily monitoring
This commit is contained in:
@@ -255,19 +255,46 @@ class Member extends Model
|
||||
);
|
||||
}
|
||||
|
||||
protected function birthDate(): Attribute
|
||||
// protected function birthDate(): Attribute
|
||||
// {
|
||||
// // $date = $this->person->birth_date ?? ($this->birth_date ?? null);
|
||||
// $date = $this->birth_date ?? ($this->person->birth_date ?? null);
|
||||
// return Attribute::make(
|
||||
// get: fn () => !empty($date) ? Carbon::parse($date)->format('Y-m-d') : null
|
||||
// );
|
||||
// }
|
||||
|
||||
protected function birthDateeCard(): Attribute
|
||||
{
|
||||
// $date = $this->person->birth_date ?? ($this->birth_date ?? null);
|
||||
$date = $this->person->birth_date ?? ($this->birth_date ?? null);
|
||||
$date = $this->birth_date ?? ($this->birth_date ?? this->person->birth_date);
|
||||
return Attribute::make(
|
||||
get: fn () => !empty($date) ? Carbon::parse($date)->format('Y-m-d') : null
|
||||
get: fn () => !empty($date) ? Carbon::parse($date)->format('d / M / Y') : null
|
||||
);
|
||||
}
|
||||
|
||||
protected function startDate(): Attribute
|
||||
{
|
||||
// $date = $this->person->birth_date ?? ($this->birth_date ?? null);
|
||||
$date = $this->members_effective_date;
|
||||
return Attribute::make(
|
||||
get: fn () => !empty($date) ? Carbon::parse($date)->format('d / M / Y') : null
|
||||
);
|
||||
}
|
||||
|
||||
protected function endDate(): Attribute
|
||||
{
|
||||
// $date = $this->person->birth_date ?? ($this->birth_date ?? null);
|
||||
$date = $this->members_expire_date;
|
||||
return Attribute::make(
|
||||
get: fn () => !empty($date) ? Carbon::parse($date)->format('d / M / Y') : null
|
||||
);
|
||||
}
|
||||
|
||||
protected function gender(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn () => $this->person->gender ?? null
|
||||
get: fn () => ucfirst($this->person->gender) ?? null
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user