Add a Laravel Service Provider
Install this using Composer by adding the following to your shell.
composer require fredbradley/slacklogs
Or if you're the type of person that likes to edit the
composer.json file directly, then add in:
Add the Service Provider to you
config/app.php, at the bottom of the array group where it lists "Package Service Providers...", add in:
Remember to ensure there's no trailing comma at the end of the array, but that there is one on the line above!
Publish the config: in your shell write:
php artisan vendor:publish --tag=slackconfig
Edit your config, in the file
webhook=> the slack webhook you have set up at https://slack.com. (More info here)
name=> change this if you wish - it will be the name that slack posts as
channel_dev=> The name of the channel you wish to post errors of your local environment to
channel_master=> The name of the channel you wish to post errors of your production environment to