Update Member Enrollment

This commit is contained in:
R
2022-09-02 13:12:23 +07:00
parent 2215f61db4
commit b2ef1bfd57
30 changed files with 229 additions and 74 deletions

View File

@@ -61,6 +61,16 @@ class Member extends Model
return $this->hasMany(CorporateEmployee::class, 'member_id');
}
public function memberPlans()
{
return $this->hasMany(MemberPlan::class, 'member_id');
}
public function plans()
{
return $this->hasManyThrough(MemberPlan::class, Plan::class, 'member_id', 'plan_id', 'id', 'plan_id');
}
public function policies()
{
return $this->hasMany(MemberPolicy::class, 'member_id', 'member_id');