Simple PHP class for sending Slack messages

There are some nice PHP packages for integrating SlackHQ, including some specifically for Laravel. However, most of these do a lot of stuff I don’t really need right now. I just needed something simple  to send a message to Slack when certain events take place in my app.

So, FWIW, i wrote a simple class that does what I need for now. It assumes you are using Guzzle, and in this example, uses Laravel’s Config facade to passing in the config settings (API token, etc.):