8lines / sylius-notification-plugin-slack-adapter
适用于Sylius通知插件的Slack适配器
1.0.1
2024-04-13 11:39 UTC
Requires
- php: >=8.0
- 8lines/sylius-notification-plugin: ^1.0
- symfony/slack-notifier: ^6.0
README
SyliusNotificationPlugin
Slack通知通道适配器
目录
概述
此包是SyliusNotificationPlugin的适配器,允许您向Slack发送通知。
安装
要安装适配器,您需要运行以下命令
composer require 8lines/sylius-notification-plugin-slack-adapter
然后配置Slack Notifier并在您的.env
文件中添加以下变量
SLACK_DSN=slack://TOKEN@default?channel=CHANNEL
最后,将以下配置添加到您的config/packages/notifier.yaml
文件中
framework: notifier: chatter_transports: slack: '%env(SLACK_DSN)%'
用法
安装完成后,您可以在应用程序中使用Slack通知通道。在创建通知期间,您可以指定一个额外的选项
recipient
- 接收通知的通道。它可以是通道名称或通道ID。如果未指定,通知将发送到默认通道。