Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic discord channel for each Notification class? #56

Open
kimchirichie opened this issue Feb 13, 2022 · 4 comments
Open

Dynamic discord channel for each Notification class? #56

kimchirichie opened this issue Feb 13, 2022 · 4 comments

Comments

@kimchirichie
Copy link

At current state of the documentation, it appears that one model is tied to one specific channel.

Is there a possible workaround to allow a model to dispatch to two different channels?

@kimchirichie
Copy link
Author

currently, my thoughts are to create new classes for each channel. this class would use the notifiable trait and define the discord channel attribute. the notification would be triggered against this new class. Is there a better approach?

@jiyoungsin
Copy link

Extend NotificationChannels\Discord\DiscordChannel@send and send in $notification into routeNotificationFor as a second parameter. this allows routeNotificationForDiscord to take in the $notification instance to compute your own business logic

@travisbotello
Copy link

Extend NotificationChannels\Discord\DiscordChannel@send and send in $notification into routeNotificationFor as a second parameter. this allows routeNotificationForDiscord to take in the $notification instance to compute your own business logic

How can I extend NotificationChannels\Discord\DiscordChannel@send?

@Gummibeer
Copy link
Contributor

This is handled/fixed in #64 as I had the same issue. But doesn't seem like that repository is really maintained anymore. 😟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants