Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567



Laravel Slack Alerts Package | Laravel News

Laravel Slack Alerts is a package by Spatie to send a message to slack quickly. While you can set up Slack notifications in Laravel’s robust notification system, sometimes all you need is a simple way to trigger a message in various slack channels:

1use SpatieSlackAlertsFacadesSlackAlert;


3SlackAlert::message("{$user->name} just signed up for your Super Awesome SaaS! :party-parrot:");

The above message is sent via a (configurable) job, and you can also configure multiple slack webhook URLs to which you can send messages:

1// config

2return [

3 'webhook_urls' => [

4 'default' => 'https://hooks.slack.com/services/XXXXXX',

5 'marketing' => 'https://hooks.slack.com/services/YYYYYY',

6 ],




10 ->message("{$user->name} just requested a SaaS demo!");

Messages can also contain markdown and Slack emojis.

If you’d like to learn more about the background behind this package, read A package to send Slack alerts in a Laravel app quickly by Freek Van der Herten.

To get started with this package, check it out the readme and source code on GitHub.

Credit: Source link

Previous Next
Test Caption
Test Description goes like this