This guide explains how to connect to and listen for real-time events using Laravel Echo and Reverb.
9080 is required.import Echo from 'laravel-echo';
window.Echo = new Echo({
broadcaster: 'reverb',
key: 'application-key',
host: 'ws://api.dambel.io:9080',
authEndpoint: 'https://api.dambel.io/broadcasting/auth',
auth: {
headers: {
Authorization: `Bearer YOUR_AUTH_TOKEN`
}
}
});
private-App.Models.User.{id}: Users receive:
Illuminate\Notifications\Events\BroadcastNotificationCreated (see Notifications)App\Events\Chats\ChatAddedApp\Events\Chats\ChatRemovedApp\Events\Chats\ChatUpdatedprivate-App.Models.Chats.Chat.{id}: Users receive chat-specific events:
App\Events\Chats\MessageSentApp\Events\Chats\MessageUpdatedApp\Events\Chats\MessageDeleted