update
This commit is contained in:
@@ -150,10 +150,16 @@ class Member extends Model
|
|||||||
|
|
||||||
public function currentPlan()
|
public function currentPlan()
|
||||||
{
|
{
|
||||||
return $this->hasOneThrough(Plan::class, MemberPlan::class, 'member_id', 'id', 'id', 'plan_id')
|
return $this->hasManyThrough(Plan::class, MemberPlan::class, 'member_id', 'id', 'id', 'plan_id');
|
||||||
->latest(); // TODO Fix This
|
// ->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()
|
public function currentEmployeds()
|
||||||
{
|
{
|
||||||
return $this->hasOneThrough(CorporateEmployee::class, Person::class, 'nik', 'id', 'id', 'nik')
|
return $this->hasOneThrough(CorporateEmployee::class, Person::class, 'nik', 'id', 'id', 'nik')
|
||||||
|
|||||||
Reference in New Issue
Block a user