Skip to content

Commit b442ff3

Browse files
committed
refactor(reverb): revert channels config
Change did not work when routes were cached.
1 parent 2400c09 commit b442ff3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

routes/channels.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
/*
4-
* **DO NOT DELETE THIS FILE**
5-
*
6-
* It has to exist, even if empty, and be passed to the withRouting() method in bootstrap/app.php,
7-
* otherwise broadcasting is not initialized, and channel routes from packages do not work.
8-
*/
3+
use Eclipse\Core\Models\User;
4+
use Illuminate\Support\Facades\Broadcast;
5+
6+
Broadcast::channel('Eclipse.Core.Models.User.{id}', function (User $user, $id) {
7+
return (int) $user->id === (int) $id;
8+
});

0 commit comments

Comments
 (0)