Slack Notification Channel Adapter
This package is an adapter for the SyliusNotificationPlugin that allows you to send notifications to Slack.
To install the adapter you need to run the following command:
composer require 8lines/sylius-notification-plugin-slack-adapter
Then configure Slack Notifier and add the following variable to your .env
file:
SLACK_DSN=slack://TOKEN@default?channel=CHANNEL
And finally, add the following configuration to your config/packages/notifier.yaml
file:
framework:
notifier:
chatter_transports:
slack: '%env(SLACK_DSN)%'
After the installation, you can use the Slack Notification Channel in your application. There are one additional option that you can specify during the notification creation:
recipient
- the channel to which the notification will be sent. It can be either a channel name or a channel ID. If not specified, the notification will be sent to the default channel.