Fix UpdateOrCreate

This commit is contained in:
2022-07-27 11:23:35 +07:00
parent 908acf0f63
commit 58e46b4a9e

View File

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