Skip to content
Laravel Slack notification channel with API token support instead of incoming webhooks.
Branch: master
Clone or download
Latest commit 9ea6f29 May 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src wip May 15, 2019
tests Provide channel in channel configuration May 15, 2019
.editorconfig initial commit May 15, 2019
.gitattributes
.gitignore
.styleci.yml
.travis.yml
LICENSE.md
composer.json initial commit May 15, 2019
phpunit.xml.dist initial commit May 15, 2019
readme.md Update readme.md May 15, 2019

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 marcel@beyondco.de instead of using the issue tracker.

Credits

License

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

You can’t perform that action at this time.