diff --git a/laravel_app/app/Listeners/UpdateMailingStatus.php b/laravel_app/app/Listeners/UpdateMailingStatus.php index 6bf65e3..1a3db44 100644 --- a/laravel_app/app/Listeners/UpdateMailingStatus.php +++ b/laravel_app/app/Listeners/UpdateMailingStatus.php @@ -22,7 +22,9 @@ public function __construct() */ public function handle(MessageSent $event): void { - ProjectMailing::where('id', $event->data['mailing']['id']) - ->update(['status' => 'success']); + if (array_key_exists('mailing' ,$event->data)) { + ProjectMailing::where('id', $event->data['mailing']['id']) + ->update(['status' => 'success']); + } } }