data = $data; } /** * Get the channels the event should broadcast on. * * @return \Illuminate\Broadcasting\Channel|array */ public function broadcastOn() { return new Channel('notification'); } /** * Broadcast with data. * * @return array */ public function broadcastWith() { return $this->data; } /** * Seperate queue. * * Command: `php artisan queue:work --queue=broadcastable` * * @return string */ public function broadcastQueue() { return 'broadcastable'; } /** * Get the channels the event should broadcast as. * * @return string */ public function broadcastAs() { return 'update-notification'; } }