Skip to main content

laravel-reverb

Implement real-time WebSocket communication with Laravel Reverb. Use when adding live updates, chat, notifications, or presence features.

Stars
13
Source
fusengine/agents
Updated
2026-05-17
Slug
fusengine--agents--laravel-reverb
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/fusengine/agents/HEAD/plugins/laravel-expert/skills/laravel-reverb/SKILL.md -o .claude/skills/laravel-reverb.md

Drops the SKILL.md into .claude/skills/laravel-reverb.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

Laravel Reverb

Agent Workflow (MANDATORY)

Before ANY implementation, use TeamCreate to spawn 3 agents:

  1. fuse-ai-pilot:explore-codebase - Analyze existing broadcasting patterns
  2. fuse-ai-pilot:research-expert - Verify Reverb docs via Context7
  3. mcp__context7__query-docs - Check WebSocket and event patterns

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

Component Purpose
Reverb Server First-party WebSocket server for Laravel
Broadcasting Send events from server to client
Channels Public, private, presence scoping
Echo Client-side event listener

Decision Guide

Need real-time?
├── Live notifications → Reverb + private channel
├── Chat / messaging → Reverb + presence channel
├── Live dashboard → Reverb + public channel
├── Collaborative editing → Reverb + whisper
└── Background tasks → NOT Reverb (use Queues)

Quick Setup

php artisan install:broadcasting
BROADCAST_CONNECTION=reverb
REVERB_APP_ID=my-app
REVERB_APP_KEY=my-key
REVERB_APP_SECRET=my-secret
REVERB_HOST=0.0.0.0
REVERB_PORT=8080

Critical Rules

  1. Use private channels for authenticated data
  2. Authorize channels in routes/channels.php
  3. Use ShouldBroadcast for queued delivery (recommended)
  4. Run Reverb behind Nginx/Caddy in production with SSL

Reference Guide

Need Reference
Channel types, authorization channels.md
Echo setup, client listeners client.md

Best Practices

DO

  • Use ShouldBroadcast with queue for scalability
  • Authorize private and presence channels
  • Use presence channels for user awareness

DON'T

  • Broadcast sensitive data on public channels
  • Forget to configure CORS for cross-origin clients
  • Expose Reverb directly without a reverse proxy

Laravel 13 Notes

Reverb 1.4 est compatible Laravel 13 sans changement. À noter :

  • La queue broadcast profite du nouveau Queue::route() (voir [[laravel-queues]])
  • Context::add() propagé automatiquement dans les broadcast events
  • PHP 8.3 minimum pour le serveur Reverb embarqué