Resonate requires PHP ^8.6 and Laravel ^13.0.
Fresh app
composer require webpatser/resonatephp artisan resonate:installphp artisan resonate:start
resonate:install does the following:
- Adds
REVERB_APP_ID,REVERB_APP_KEY,REVERB_APP_SECRET,REVERB_HOST,REVERB_PORTandREVERB_SCHEMEto your environment file, together with the matchingVITE_REVERB_*variables. - Publishes
config/reverb.php. - Adds a
reverbconnection toconfig/broadcasting.phpwhen none exists. - When
routes/channels.phpis missing, asks whether to enable event broadcasting and, on yes, runsinstall:broadcasting. - Asks whether to set
BROADCAST_DRIVERorBROADCAST_CONNECTIONtoreverbin your environment file.
When it finishes it prints three things to review before production:
- Tighten
allowed_originsinconfig/reverb.php. It is set to['*']. - Set
REVERB_SERVER_HOST=127.0.0.1when Resonate runs behind a reverse proxy, instead of binding0.0.0.0. - Rotate the generated
REVERB_APP_SECRETfor non-development environments.
Swap from laravel/reverb
composer remove laravel/reverbcomposer require webpatser/resonate
Nothing else changes:
- Same
config/reverb.php. Resonate reads the existing file. - New artisan commands:
resonate:start,resonate:restart,resonate:reloadandresonate:install. Update supervisor, systemd and Docker entrypoints accordingly. - Same
laravel:reverb:restartcache key. Running servers restart on the same signal. - Same Pusher wire protocol (byte-exact JSON framing) and the same Pusher-compatible REST API.
- Front-end Echo and
pusher-jsconfigs stay as they are.
Note: A scaled cluster cannot run Resonate and
laravel/reverbnodes side by side. Resonate uses a pure JSON envelope for cross-node messages, so the migration is all at once. See Scaling.