Refresh list status over Reverb with polling fallback, clarify queued vs processing, streamline upload empty states, and seed an admin login.
17 lines
451 B
PHP
17 lines
451 B
PHP
<?php
|
|
|
|
use App\Models\Recording;
|
|
use App\Models\User;
|
|
use Illuminate\Support\Facades\Broadcast;
|
|
|
|
Broadcast::channel('recording.{recordingId}', function (User $user, int $recordingId): bool {
|
|
return Recording::query()
|
|
->whereKey($recordingId)
|
|
->where('user_id', $user->id)
|
|
->exists();
|
|
});
|
|
|
|
Broadcast::channel('user.{userId}.recordings', function (User $user, int $userId): bool {
|
|
return (int) $user->id === $userId;
|
|
});
|