MoonGuard uses laravel/slack-notification-channel as a dependency to build Slack notifications, in case you want to send MoonGuard notifications to Slack you need a Slack Weebhook URL.
To obtain the webhook, you can create a Slack App on the Slack API site. This is a simple process that involves creating an app for your workspace:
- Create an App from scratch. In the “Create New App” buttom press create app “From scratch”
- Activate an incoming Webhook.
- Add a new incoming Webhook.
- Decide which channel to post notifications.
Once you have obtained the webhook URL, you must update the .env file of your Laravel project with the SLACK_WEBHOOK_URL variable.
Finally activate the Slack channel in the MoonGuard config file.
'notifications' => [
'channels' => ['mail', 'slack'], //<-- add 'slack'
'slack' => [
'webhook_url' => env('SLACK_WEBHOOK_URL'),
If you're using a custom user model, it must implement the