Fix CreateOrUpdate Benefit

This commit is contained in:
2022-07-27 14:30:20 +07:00
parent 979aa9c056
commit 214a2f3ce2

View File

@@ -42,6 +42,7 @@ class CorporateService
$this->validatePlanRow($plan_data);
$plan = Plan::updateOrCreate([
'service_code' => $plan_data['service_code'],
'corporate_id' => $corporate->id,
'code' => $plan_data['code'],
], $plan_data);
@@ -89,6 +90,7 @@ class CorporateService
$this->validateBenefitRow($benefit_data);
$plan = Benefit::updateOrCreate([
'service_code' => $benefit_data['service_code'],
'corporate_id' => $corporate->id,
'code' => $benefit_data['code'],
], $benefit_data);