From 7b7974fbfae02ae7014d101ea893a5383340aece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 20 Sep 2024 18:35:53 +0200 Subject: [PATCH] clean up channels --- routes/channels.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/routes/channels.php b/routes/channels.php index 583b8f986814..0395b473facb 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -11,8 +11,6 @@ | */ -use App\Models\User; - // Broadcast::channel('App.User.{id}', function ($user, $id) { // nlog($id); @@ -20,18 +18,6 @@ use App\Models\User; // // return (int) $user->id === (int) $id; // }); -Broadcast::channel('company-{company_key}', function (User $user, string $company_key) { +Broadcast::channel('company-{company_key}', function (\App\Models\User $user, string $company_key) { return $user->company()->company_key === $company_key; }); - -Broadcast::channel('company-${company.company_key}.{roomId}', function (User $user, int $roomId) { - if ($user->canJoinRoom($roomId)) { - return ['id' => $user->id, 'name' => $user->name]; - } -}); - -Broadcast::channel('company-{company_key}.invoices.{invoice_id}', function (User $user, string $company_key, string $invoice_id) { - // @todo - - return true; -});