Brotcast

Brezel Brotcast is a websocket server based on laravel-websockets that supports the Pusher protocol.

If Brotcast is configured, the Brezel API can send messages to authenticated Brezel users in real-time using websockets. Brezel SPA, using Laravel Echo , can listen on multiple channels provided by the API and react to live events.

Installing Brotcast

Clone the repository and install the dependencies.

composer install

In your .env, set PUSHER_APP_ID, PUSHER_APP_KEY and PUSHER_APP_SECRET to the values you want.

To start the websocket broker, enter the following command:

php artisan websockets:serve

Different port:

php artisan websockets:serve --port=3030

Different host:

php artisan websockets:serve --host=127.0.0.1

Connecting the API

In brezel-api or your Brezel instance, set these environment variables accordingly:

BREZEL_BROTCAST_HOST=<this ws host>
BREZEL_BROTCAST_APP_ID=<this pusher app id>
BREZEL_BROTCAST_KEY=<this pusher app key>
BREZEL_BROTCAST_SECRET=<this pusher app secret>
BREZEL_BROTCAST_SCHEME=https
BREZEL_BROTCAST_PORT=<the websocket port>