mikebarlow / megaphone

Livewire UI for Laravel based user notifications
MIT License
258 stars 18 forks source link

Multiple Notifiable models #33

Open mginod opened 9 months ago

mginod commented 9 months ago

Hello,

thank you for this great package, I'm having a lot of fun in my project using it.

My project has teams and users belonging to teams. Both the Team model and User model can be Notifiable. I'd like to know if there is a way to display at the same time notifications for the current user and for the team the current user belongs to. I've seen that a notifiableId parameter can be passed to the megaphone component but it's either the user or the team. Plus that would need to adjust the model property in the config file.

What would be the strategy to achieve the described behavior? Thank you for your input on this matter!

mikebarlow commented 6 months ago

I like this idea and can definitely see the uses for it. I'll have a think on the best way to achieve this and may even roll it out in the next release if i can come up with a sensible solution.