mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-18 00:15:00 +00:00
wip: broadcast
This commit is contained in:
1 parent
17deff4d86
commit
42ee4ca032
22 files changed
+142
-103
No files matched your search
+10
-3
@@ -11,6 +11,13 @@
|
||||
|
|
||||
*/
|
||||
|
||||
// Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
|
||||
// return (int) $user->id === (int) $id;
|
||||
// });
|
||||
use App\Models\Application;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
Broadcast::channel('custom.{teamId}', function (User $user, int $teamId) {
|
||||
if ($user->teams->pluck('id')->contains($teamId)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
Reference in new issue
Block a user