There is no license information available for the latest version (1.1.0) of this package.

Yii Post Message to Slack Channel

1.1.0 2019-02-28 16:54 UTC

This package is auto-updated.

Last update: 2024-02-29 03:30:57 UTC


Post a message to a Slack Channel. Pedefined functions to enable coloring.


Add the indielab/yii2-slack package to your composer.json

composer require indielab/yii2-slack

Add the component to your config in the components section:

'components' => [
    // ...
    'slack' => [
        'class' => 'Indielab\Slack\Client',
        'token' => 'xoxp-1234567891-1234567891-1234567891',
        'channel' => 'indielab',
        'username' => 'Slack Bot',

Using in your Application:

Yii::$app->slack->message('Just a Message')->send();

Send colorized Messages:

Yii::$app->slack->danger('Very dangerous!')->send();
  • danger
  • warning
  • success