diff --git a/src/Providers/NotificationServiceProvider.php b/src/Providers/NotificationServiceProvider.php index 654f745..2c7fc69 100644 --- a/src/Providers/NotificationServiceProvider.php +++ b/src/Providers/NotificationServiceProvider.php @@ -33,8 +33,7 @@ public function boot() 'data' => [ 'channel' => $event->channel, 'notifiable' => get_class($event->notifiable), - ], - 'response' => $event->response, + ] ]); $this->segments[$event->notification->id] = $segment; @@ -43,7 +42,9 @@ public function boot() $this->app['events']->listen(NotificationSent::class, function (NotificationSent $event) { if (array_key_exists($event->notification->id, $this->segments)) { - $this->segments[$event->notification->id]->end(); + $this->segments[$event->notification->id] + ->setContext(['response' => $event->response]) + ->end(); } }); }