diff --git a/src/Illuminate/Notifications/NotificationSender.php b/src/Illuminate/Notifications/NotificationSender.php index a90c5f804c96..a022baecc60c 100644 --- a/src/Illuminate/Notifications/NotificationSender.php +++ b/src/Illuminate/Notifications/NotificationSender.php @@ -111,7 +111,7 @@ public function sendNow($notifiables, $notification, ?array $channels = null) } $this->withLocale($this->preferredLocale($notifiable, $notification), function () use ($viaChannels, $notifiable, $original) { - $notificationId = Str::uuid()->toString(); + $notificationId = (string) Str::uuid(); foreach ((array) $viaChannels as $channel) { if (! ($notifiable instanceof AnonymousNotifiable && $channel === 'database')) { @@ -216,7 +216,7 @@ protected function queueNotification($notifiables, $notification) $original = clone $notification; foreach ($notifiables as $notifiable) { - $notificationId = Str::uuid()->toString(); + $notificationId = (string) Str::uuid(); foreach ((array) $original->via($notifiable) as $channel) { $notification = clone $original; diff --git a/src/Illuminate/Support/Testing/Fakes/NotificationFake.php b/src/Illuminate/Support/Testing/Fakes/NotificationFake.php index 9e6515ce6e4f..c55f493f121e 100644 --- a/src/Illuminate/Support/Testing/Fakes/NotificationFake.php +++ b/src/Illuminate/Support/Testing/Fakes/NotificationFake.php @@ -314,7 +314,7 @@ public function sendNow($notifiables, $notification, ?array $channels = null) foreach ($notifiables as $notifiable) { if (! $notification->id) { - $notification->id = Str::uuid()->toString(); + $notification->id = (string) Str::uuid(); } $notifiableChannels = $channels ?: $notification->via($notifiable);