Skip to content

Commit 069dd2e

Browse files
Merge pull request #2324 from suraj-webkul/issue#2322
Issue #2322 has been fixed.
2 parents 2f2b1bb + 0423300 commit 069dd2e

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

packages/Webkul/Admin/src/Http/Controllers/Lead/LeadController.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,17 @@ public function updateStage(int $id)
314314

315315
Event::dispatch('lead.update.before', $id);
316316

317-
$lead = $this->leadRepository->update(
318-
[
319-
'closed_at' => request()->date('closed_at'),
320-
'entity_type' => 'leads',
321-
'lead_pipeline_stage_id' => $stage->id,
322-
],
323-
$id,
324-
['lead_pipeline_stage_id']
325-
);
317+
$payload = request()->merge([
318+
'entity_type' => 'leads',
319+
'lead_pipeline_stage_id' => $stage->id,
320+
])->only([
321+
'closed_at',
322+
'lost_reason',
323+
'lead_pipeline_stage_id',
324+
'entity_type',
325+
]);
326+
327+
$lead = $this->leadRepository->update($payload, $id, ['lead_pipeline_stage_id']);
326328

327329
Event::dispatch('lead.update.after', $lead);
328330

0 commit comments

Comments
 (0)