update emel dari file

This commit is contained in:
Saufi
2026-05-20 22:18:51 +08:00
parent 9e5ff6b85e
commit 2aae3d2d6d

View File

@@ -109,6 +109,15 @@ class ParticipantImportService
] ]
); );
// Kemaskini emel, telefon dan agensi jika peserta sedia ada dan CSV ada data
if (! $participant->wasRecentlyCreated) {
$updates = [];
if (! empty($data['email'])) $updates['email'] = $data['email'];
if (! empty($data['phone'])) $updates['phone'] = $data['phone'];
if (! empty($data['agency'])) $updates['agency'] = $data['agency'];
if ($updates) $participant->update($updates);
}
$pp = $program->programParticipants() $pp = $program->programParticipants()
->where('participant_id', $participant->id) ->where('participant_id', $participant->id)
->first(); ->first();