Client Portal - Employee Data

This commit is contained in:
Muhammad Fajar
2024-01-06 11:40:40 +07:00
parent 37b8229fc2
commit 23081382ce
8 changed files with 577 additions and 58 deletions

View File

@@ -40,7 +40,7 @@ class Person extends Model
'updated_by',
'deleted_by'
];
protected $hidden = [
'created_at',
'updated_at',
@@ -126,6 +126,11 @@ class Person extends Model
return $this->morphMany(AppointmentParticipant::class, 'participantable');
}
public function member()
{
return $this->hasOne(Member::class);
}
public function setGenderAttribute($value)
{
if ($value == "M" || $value == "L") {
@@ -139,7 +144,6 @@ class Person extends Model
public function getGenderAttribute()
{
if ($this->attributes['gender'] == "male" || $this->attributes['gender'] == "L") {
return "male";
} else if ($this->attributes['gender'] == "female" || $this->attributes['gender'] == "P") {
@@ -148,9 +152,4 @@ class Person extends Model
return "other";
}
}
public function updatePerson()
{
$this-> update ( $data );
}
}