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

[5.5] An easy way to route notifications on the go #19998

Merged
merged 3 commits into from
Jul 11, 2017
Merged

[5.5] An easy way to route notifications on the go #19998

merged 3 commits into from
Jul 11, 2017

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Jul 11, 2017

This PR allows for the following:

(new InstantNotifiable())
            ->addRoute('enzo@deepblue.com', 'mail')
            ->addRoute('https://slack-webhook...', 'slack')
            ->notify(new TestNotification())

Sometimes you need to use an existing notification class to send to a non-existing entity, like a specific slack webhook that doesn't belong to any notifiable, or global email address that doesn't belong to any notifiable.

@taylorotwell taylorotwell merged commit 8911143 into laravel:master Jul 11, 2017
@martinbean
Copy link
Contributor

YES! This is going to be so handy. I have a load of notifications I send to Slack on the back of events in an application, where I “notified” the admin user(s).

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

Successfully merging this pull request may close these issues.

3 participants