9 months ago

Adding custom private channel for broadcasting notification in laravel

Posted 9 months ago by SkyCoder

Broadcasting works but it uses notifiable_type as channel name with user id. But what if I want to change only on backend api that some model is within 10 sub folders. I would need to change that channel on frontend everywhere...

From docs I found this:

     * The channels the user receives notification broadcasts on.
     * @return string
    public function receivesBroadcastNotificationsOn()
        return 'users.'.$this->id;

But it is not working, it is still using notifiable_type as channel name.. How can I change this?

Please sign in or create an account to participate in this conversation.