laravel-slack

A minimalist laravel package to post messages or notifications to your team's Slack.

View the Project on GitHub

laravel-slack

Author Travis Quality Score Code Climate Total Downloads Packagist Version Software License SensioLabsInsight

A very tiny and lightweight integration with the Slack API for posting notifications or any kind of messages to your team’s Slack account.


Requirements

Installation

Using Composer package manager, install this package by running following command in your project root:

$ composer require jivesh/laravel-slack

Registering the Package

/**
 * Package Service Provider
 */

'providers' => [
    // ...

    Gahlawat\Slack\SlackServiceProvider::class,
],
/**
 * Package Alias
 */

'aliases' => [
    // ...

    'Slack' => Gahlawat\Slack\Facade\Slack::class,
],

Configuration

$ php artisan vendor:publish

Usage

\Slack::send("your-message");
use Slack;
Slack::send("your-message");
Slack::send("your-message" [,"display-name" [,"display-emoji"] [,"#channel" or "@username"]]);

// here [] indicates optional parameters

See this cheat sheet of available emoji icons.