47

GitHub - beyondcode/slack-notification-channel: Laravel Slack notification chann...

 5 years ago
source link: https://github.com/beyondcode/slack-notification-channel
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

readme.md

Laravel Slack API Token Notification Channel

Latest Version on Packagist Build Status Quality Score Total Downloads

This is the Laravel Slack notification channel, but instead of using incoming webhooks, this channel makes use of OAuth access tokens.

https://phppackagedevelopment.com

If you want to learn how to create reusable PHP packages yourself, take a look at my upcoming PHP Package Development video course.

Usage

Install the package via composer:

composer require beyondcode/slack-notification-channel

The service provider gets registered automatically and you can use this package as a replacement of the core Laravel Slack notification channel.

Notification Routing

Since this notification channel makes use of Slack API tokens instead of incoming webhook URLs, you need to return an array containing the API token and an optional channel. This channel will be used, if it is not provided in the SlackMessage that you send:

public function routeNotificationForSlack()
{
    return [
        'token' => 'xoxp-slack-token',
        'channel' => '#general'
    ];
}

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK