tigran-cl/laravel-slack

Forked laravel-slack.
1,502 2
Install
composer require tigran-cl/laravel-slack
Latest Version:1.0.6
PHP:>=7.0.0
Laravel:5
License:MIT
Last Updated:Mar 30, 2019
Links: GitHub  ·  Packagist
Maintainer: tigran-cl

Build Status codecov Latest Stable Version PHP from Packagist Laravel Version Total Downloads License
Based on illuminate/mail

About Laravel Slack

Slack notification for Laravel as it should be. Easy, fast, simple and highly testable. Since it uses On-Demand Notifications, it requires Laravel 5.5 or higher.

Installation

Require this package in your composer.json and update your dependencies:

composer require tigran-cl/laravel-slack

Since this package supports Laravel's Package Auto-Discovery you don't need to manually register the ServiceProvider.

After that, publish the configuration file:

php artisan vendor:publish --provider="Pressutto\LaravelSlack\ServiceProvider"

You're gonna need to configure an "Incoming Webhook" integration for your Slack team.

Configuration

The motivation for this fork is to allow pointing a channel to a webhook url. Instead of having just one SLACK_WEBHOOK_URL env variable, this package has an array in the config. Point your channel name to that channel's webhook url like so in laravel-slack.php (the published config file) :

    'slack_webhook_urls' => [
        '#channel1' => env('CHANNEL1_WEBHOOK_URL'),
        '#channel2' => env('CHANNEL2_WEBHOOK_URL')
    ]

So when you do \Slack::to('#channel1'), it will use the webhook URL you configured for it. For the original package see https://github.com/gpressutto5/laravel-slack

Related Packages

maknz/slack

A simple PHP package for sending messages to Slack, with a focus on ease of use...

12,268,865 1,160
alek13/slack

A simple PHP package (fork of maknz/slack) for sending messages to Slack, with a...

6,138,168 137
nexylan/slack

A simple PHP package for sending messages to Slack, with a focus on ease of use...

1,678,968 104
maknz/slack-laravel

Laravel 4 and 5 integration for the maknz/slack package, including facades and s...

993,957 154
jeremykenedy/slack

A simple PHP package for sending messages to Slack.

990,264 10

Version History

Version Released PHP Laravel License
1.0.6 >=7.0.0 ^5.5 MIT
1.0.5 >=7.0.0 ^5.5 MIT
1.0.4 >=7.0.0 ^5.5 MIT
1.0.3 >=7.0.0 ^5.5 MIT
1.0.2 >=7.0.0 ^5.5 MIT