credential = $credential; } /** * Get the channels the event should broadcast on. * * @return \Illuminate\Broadcasting\Channel|array */ public function broadcastOn() { if ($this->credential->pcid != 0) { return new Channel('credlist.pcid.'.$this->credential->pcid); } else { return new Channel('credlist.groupid.'.$this->credential->groupid); } } }