8lines/sylius-notification-plugin-slack-adapter

Slack adapter for Sylius Notification Plugin

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:sylius-notification-plugin-adapter

1.0.1 2024-04-13 11:39 UTC

This package is auto-updated.

Last update: 2024-12-13 12:55:11 UTC


README

8lines

SyliusNotificationPlugin

Slack Notification Channel Adapter

Table of Content

Overview

This package is an adapter for the SyliusNotificationPlugin that allows you to send notifications to Slack.

Installation

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)%'

Usage

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.