Files
imail/routes/channels.php

10 lines
360 B
PHP

<?php
use Illuminate\Support\Facades\Broadcast;
// 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