update benefit import
This commit is contained in:
@@ -245,14 +245,13 @@ class CorporateService
|
||||
->where('corporate_plan_id', $benefit_data['plan_code'])
|
||||
->first();
|
||||
$benefit_data['plan_code'] = $plan->id;
|
||||
$benefit = Benefit::updateOrCreate([
|
||||
$benefit = Benefit::firstOrCreate([
|
||||
'code' => $benefit_data['code'],
|
||||
'service_code' => $plan->service_code,
|
||||
], [
|
||||
'code' => $benefit_data['code'],
|
||||
'service_code' => $plan->service_code,
|
||||
'description' => $benefit_data['description'],
|
||||
'description' => $benefit_data['description'], // hanya initial
|
||||
]);
|
||||
|
||||
$corporateBenefit = $corporate->corporateBenefits()->updateOrCreate([
|
||||
'benefit_id' => $benefit->id,
|
||||
'plan_id' => $plan->id,
|
||||
|
||||
Reference in New Issue
Block a user