{"repo":"spatie/laravel-slack-alerts","free":true,"listed":false,"github":"https://github.com/spatie/laravel-slack-alerts","clone":"git clone https://github.com/spatie/laravel-slack-alerts.git","description":"Quickly send a message to Slack","language":"PHP","stars":333,"topics":["php","logging","slack","laravel"],"license":"MIT","category":"chat-messaging","readme_excerpt":"Quickly send a message to Slack This package can quickly send alerts to Slack. You can use this to notify yourself of any noteworthy events happening in your app. Under the hood, a job is used to communicate with Slack. This prevents your app from failing in case Slack is down. Want to send alerts to Discord instead? Check out laravel-discord-alerts. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via composer: You can set a SLACK ALERT WEBHOOK env variable containing a valid Slack webhook URL. You can learn how to get a webhook URL in the Slack API docs. Alternatively, you can publish the config file with: This is the contents of the published config file: Usage To send a message to Slack, simply call SlackAlert::message() and pass it any message you want. Sending blocks Slack supports sending rich formatting using their Block Kit API, you can send a set of blocks using the blocks() method: Using multiple webhooks You can also use an alternative webhook, by specify extra ones in the config file. The webhook to be used can be chosen using the to function. Using a custom webhooks The to function also supports custom web","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/laravel-slack-alerts/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}