Add Fortify auth, Flux dark mode, demo seed, and Docker hot reload.
Protect recordings per user, seed a demo login on container start, and bind-mount the app with Vite HMR for local Compose development.
This commit is contained in:
+7
-12
@@ -1,17 +1,12 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Recording;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Transcription updates use the public "recordings" channel (no auth).
|
||||
| Private channel stubs can be added here when the app gains users.
|
||||
|
|
||||
*/
|
||||
|
||||
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
Broadcast::channel('recording.{recordingId}', function (User $user, int $recordingId): bool {
|
||||
return Recording::query()
|
||||
->whereKey($recordingId)
|
||||
->where('user_id', $user->id)
|
||||
->exists();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user