Merge remote-tracking branch 'origin/master' into feature/client-portal

This commit is contained in:
Fajar
2023-04-06 15:31:34 +07:00
25 changed files with 1862 additions and 51 deletions

View File

@@ -124,24 +124,7 @@ class Member extends Model
public function currentCorporate()
{
// return $this->belongsToMany(Corporate::class, 'corporate_employees', 'corporate_id', 'member_id')
// // ->withPivot([
// // 'branch_code',
// // 'divison_id',
// // 'nik',
// // 'status',
// // 'start',
// // 'end'
// // ])
// ->where('start', '<', now())
// ->where('end', '>', now());
return $this->hasOneThrough(Corporate::class, CorporateEmployee::class, 'member_id', 'id', 'id', 'corporate_id');
// ->where('corporate_policies.start', '<', now())
// ->where('corporate_policies.end', '>', now())
// ->where('member_policies.start', '<', now())
// ->where('member_policies.end', '>', now());
}
public function memberPlans()