improvement uat 1
This commit is contained in:
@@ -148,18 +148,35 @@ class Member extends Model
|
||||
return $this->hasManyThrough(Plan::class, MemberPlan::class, 'member_id', 'id', 'id', 'plan_id');
|
||||
}
|
||||
|
||||
public function currentPlan()
|
||||
public function currentPlans()
|
||||
{
|
||||
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();
|
||||
// ->where('plans.service_code', $this->claimRequest->service_code); // TODO Fix This
|
||||
}
|
||||
|
||||
// public function currentPlan()
|
||||
// {
|
||||
// return $this->hasOneThrough(Plan::class, MemberPlan::class, 'member_id', 'id', 'id', 'plan_id')
|
||||
// ->latest(); // TODO Fix This
|
||||
// return $this->hasOneThrough(
|
||||
// Plan::class,
|
||||
// MemberPlan::class,
|
||||
// 'member_id',
|
||||
// 'id',
|
||||
// 'id',
|
||||
// 'plan_id'
|
||||
// )
|
||||
// ->join('claim_requests', 'claim_requests.service_code', '=', 'plans.service_code')
|
||||
// ->latest('claim_requests.created_at') // Atau sesuaikan dengan kolom timestamp yang sesuai
|
||||
// ->select('plans.*');
|
||||
// }
|
||||
|
||||
|
||||
public function currentEmployeds()
|
||||
{
|
||||
return $this->hasOneThrough(CorporateEmployee::class, Person::class, 'nik', 'id', 'id', 'nik')
|
||||
|
||||
Reference in New Issue
Block a user