diff --git a/app/Models/Member.php b/app/Models/Member.php index cb0caa13..17e0a85e 100644 --- a/app/Models/Member.php +++ b/app/Models/Member.php @@ -150,10 +150,16 @@ class Member extends Model public function currentPlan() { - return $this->hasOneThrough(Plan::class, MemberPlan::class, 'member_id', 'id', 'id', 'plan_id') - ->latest(); // TODO Fix This + return $this->hasManyThrough(Plan::class, MemberPlan::class, 'member_id', 'id', 'id', 'plan_id'); + // ->latest(); // TODO Fix This } + // public function currentPlan() + // { + // return $this->hasOneThrough(Plan::class, MemberPlan::class, 'member_id', 'id', 'id', 'plan_id') + // ->latest(); // TODO Fix This + // } + public function currentEmployeds() { return $this->hasOneThrough(CorporateEmployee::class, Person::class, 'nik', 'id', 'id', 'nik')