fix: channels
feat: database backup is realtime now
This commit is contained in:
@@ -15,9 +15,16 @@ use App\Models\Application;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
Broadcast::channel('custom.{teamId}', function (User $user, int $teamId) {
|
||||
Broadcast::channel('team.{teamId}', function (User $user, int $teamId) {
|
||||
if ($user->teams->pluck('id')->contains($teamId)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
Broadcast::channel('user.{userId}', function (User $user) {
|
||||
if ($user->id === auth()->user()->id) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user