Update Validasi

This commit is contained in:
2023-05-15 11:10:16 +07:00
parent 70b0d880fc
commit 342725ebcc
8 changed files with 231 additions and 26 deletions

View File

@@ -54,6 +54,10 @@ class Member extends Model
"pre_existing",
"bpjs_id",
"endorsement_date",
"members_effective_date",
"members_expire_date",
"activation_date",
"terminated_date",
"remarks",
"policy_in_force",
"start_no_claim",
@@ -216,8 +220,8 @@ class Member extends Model
protected function birthDate(): Attribute
{
// $date = $this->person->birth_date ?? ($this->birth_date ?? null);
$date = $this->person->birth_date ?? ($this->birth_date ?? null);
return Attribute::make(
get: fn () => !empty($date) ? Carbon::parse($date)->format('Y-m-d') : null
);