Step 5: Real-time broadcasting (NewEmailReceived event, channel routes, Livewire listener)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
});
|
||||
// Private channel: authenticated user can only listen to their own channel
|
||||
Broadcast::channel('user.{id}', fn ($user, $id) => (int) $user->id === (int) $id);
|
||||
|
||||
// Public channel: mailbox.{domain} — no auth needed for temp email service
|
||||
// The domain channel is public so guests can receive real-time updates
|
||||
|
||||
Reference in New Issue
Block a user