broadcastingConfig top-level property
Broadcasting configuration, registered as a configFactories entry so the
env reads run after .env is loaded.
Connections
reverb: Laravel Reverb WebSocket servernull: no-op driver; drops every broadcast event silently (the default)
Reverb options
host/port/scheme: WebSocket endpoint coordinatesapp_key: Reverb application key (matches the server config)auth_endpoint: HTTP endpoint for private and presence channel authreconnect: reconnect on an unexpected disconnectmax_reconnect_delay: maximum back-off delay in millisecondsactivity_timeout: seconds of inactivity before a ping is sentconnection_timeout: seconds to wait for the connection to establish
Implementation
Map<String, dynamic> get broadcastingConfig => {
'broadcasting': {
'default': env('BROADCAST_CONNECTION', 'null'),
'connections': {
'reverb': {
'driver': 'reverb',
'host': env('REVERB_HOST', 'localhost'),
'port': int.tryParse(env('REVERB_PORT', '8080')) ?? 8080,
'scheme': env('REVERB_SCHEME', 'ws'),
'app_key': env('REVERB_APP_KEY', ''),
'auth_endpoint': '/broadcasting/auth',
'reconnect': true,
'max_reconnect_delay': 30000,
'activity_timeout': 120,
'connection_timeout': 15,
},
'null': {'driver': 'null'},
},
},
};