Laravel - Broadcasting - Ably
If you plan to broadcast your events using Ably, you should install the Ably PHP SDK using the Composer package manager:
composer require ably/ably-php
Next, you should configure your Ably credentials in the config/broadcasting.php
configuration file. An example Ably configuration is already included in this file, allowing you to quickly specify your key. Typically, this value should be set via the ABLY_KEY
environment variable:
ABLY_KEY=your-ably-key
Next, you will need to change your broadcast driver to ably
in your .env
file:
BROADCAST_DRIVER=ably
Finally, you are ready to install and configure Laravel Echo, which will receive the broadcast events on the client-side.