update
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user