superbuddy/slack

A Laravel package to post Slack Message
23
Install
composer require superbuddy/slack
Latest Version:1.0.2
License:MIT
Last Updated:Aug 1, 2016
Links: GitHub  ·  Packagist
Maintainer: superbuddy

Slack

A Laravel package for sending Messages to Slack

Usage

composer

Require it:

  • "CJSDevelopment/slack" : "dev-master"

app.php

Add the following data:

ServiceProvider

  • 'CJSDevelopment\SlackServiceProvider'

Facade

  • 'Slack' => 'CJSDevelopment\Slack',

Deploy / Update

Execute the following commands in your console:

  • sudo composer selfupdate
  • sudo composer update
  • sudo php artisan vendor:publish

Config

After executing the vendor:publish command you will find a config file in the Laravel config folder. Fill the Mandatory fields, check the optional. Don't forget!! Create a webhook URL http://your-domain.slack.com/services/

Usage in your code:

Slack::sendMessage("Message!", "#channel");

Options

Parameter Position Description Option(s) Default
1 Message to send none none
2 Channel or Username to send @username of #channel #general
3 Username of the Bot Any name you want to give the BOT CJSDevelopment Slack Bot
4 Icon The icon you want to use for your BOT as avatar :ghost:

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

628,058,007 9,707
laravel/framework

The Laravel Framework.

576,155,700 34,907
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440