MasoniteFramework / notifications

Notification package for Masonite
2 stars 1 forks source link

added via method to notification class #3

Closed josephmancuso closed 5 years ago

josephmancuso commented 5 years ago

This PR adds the ability to add a via and send method so instead of doing something like:

def show(self, notify: Notify):
    notify.mail(WelcomeNotification, to="email@email.com")
    notify.slack(WelcomeNotification, to="email@email.com")

we can do:

def show(self, notify: Notify):
    notify.via('mail', 'slack').send(WelcomeNotification, to="email@email.com")