From d12e277230f66f08aeb540ea3a8c22a3c629a5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 18 Sep 2024 13:12:05 +0200 Subject: [PATCH] update channel name --- app/Events/Invoice/InvoiceWasPaid.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Events/Invoice/InvoiceWasPaid.php b/app/Events/Invoice/InvoiceWasPaid.php index 6f845592ce9b..d2370535b62f 100644 --- a/app/Events/Invoice/InvoiceWasPaid.php +++ b/app/Events/Invoice/InvoiceWasPaid.php @@ -16,6 +16,7 @@ use App\Models\Company; use App\Models\Invoice; use App\Models\Payment; use Illuminate\Broadcasting\Channel; +use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Queue\SerializesModels; @@ -55,11 +56,7 @@ class InvoiceWasPaid implements ShouldBroadcast public function broadcastOn(): array { return [ - // @todo: make sure this is PrivateChannel once we have auth configured. - - new Channel( - name: $this->company->company_key . '_invoices', - ), + new PrivateChannel("{$this->company->company_key}.invoices"), ]; }