I have a question and I do not find an answer that satisfies me.
I have an app of Soccer Teams:
- A user can join multiple teams,
- I want to send notifications when an action in a team occurs (for example, when a match is scheduled)
I broadcast on channels this way:
new PrivateChannel('team.' . $this->team->id);
But I don't know how to register a User in multiple channels.
The question is, do I need to register the User to the channels of every team that he belongs?
for ($user->teams as $team) {
Echo.private('team.'.$team->id)
}
Is there any other way to register the user to his channels?
Thank you in advance.