Looking to hire Laravel developers? Try LaraJobs

laravel-zmq-driver maintained by cxbyte

Description
Zmq broadcasting driver for Laravel
Author
Last update
2016/11/22 13:51 (dev-master)
License
Downloads
46

Comments
comments powered by Disqus

#Zmq broadcasting driver for Laravel

#Installation composer require cxbyte/laravel-zmq-driver

#Configure

  1. add to your config/app.php in providers section Cxbyte\ZmqDriver\ZmqDriverServiceProvider::class

  2. add to your .env file BROADCAST_DRIVER=zmq BROADCAST_ZMQ_PORT=5555

#Using You have to create your own event class extends from Cxbyte\ZmqDriver\Events\AbstractEvent and define broadcastOn method with channels for broadcasting. Sample event class SampleEvent.php you can see in Events folder.

public function broadcastOn() { return new Channel('items'); define your channels here }

The channels should be instances of Channel, PrivateChannel, or PresenceChannel.

More info Laravel broadcast events

And then you can fire event like event(new Cxbyte\ZmqDriver\Events\SampleEvent('hello'))