diff --git a/packages/notifications/src/BroadcastNotification.php b/packages/notifications/src/BroadcastNotification.php index 42800b5a7f..fb762e202a 100644 --- a/packages/notifications/src/BroadcastNotification.php +++ b/packages/notifications/src/BroadcastNotification.php @@ -4,11 +4,12 @@ namespace Filament\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\Eloquent\Model; use Illuminate\Notifications\Messages\BroadcastMessage; use Illuminate\Notifications\Notification as BaseNotification; -class BroadcastNotification extends BaseNotification implements ShouldQueue +class BroadcastNotification extends BaseNotification implements ShouldQueue, Arrayable { use Queueable; @@ -36,4 +37,12 @@ class BroadcastNotification extends BaseNotification implements ShouldQueue { return new BroadcastMessage($this->data); } + + /** + * Array representation of this notification. + */ + public function toArray(): array + { + return $this->data; + } }