2017 © Pedro Peláez
 

library beep

Beep is a lightweight Laravel package for sending notifications to your team via Slack and HipChat

image

seleznev/beep

Beep is a lightweight Laravel package for sending notifications to your team via Slack and HipChat

  • Sunday, February 14, 2016
  • by seleznev
  • Repository
  • 1 Watchers
  • 4 Stars
  • 9,438 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Beep :mega:

Beep is a lightweight Laravel package for sending notifications to your team via Slack and HipChat. Inspiration and the initial code was taken from Laravel Envoy., (*1)

Installation

Require the seleznev/beep package using Composer:, (*2)

composer require seleznev/beep

Add the service provider in config/app.php to providers array:, (*3)

Seleznev\Beep\ServiceProvider::class,

Add the alias in config/app.php to aliases array:, (*4)

'Beep' => Seleznev\Beep\Facade::class,

For the Laravel 5.0.* you should add 'Seleznev\Beep\ServiceProvider', and 'Beep' => 'Seleznev\Beep\Facade', respectively., (*5)

Configuration

To get started, you'll need to create a Slack token or a HipChat token., (*6)

Add your SLACK_TOKEN and HIPCHAT_TOKEN to the .env file., (*7)

Usage

Send a message to a Slack channel:, (*8)

Beep::slack('#channel')->say('Hi');

Send a message to a HipChat room:, (*9)

Beep::hipchat('room')->say('Hi');

Send a message from a chosen name:, (*10)

Beep::slack('#channel')->from('My application')->say('Hi');

A few attractive examples:, (*11)

public function report(Exception $e)
{
    parent::report($e);

    $message = App::environment().': '.$e->getMessage();

    Beep::slack('#logs')->say($message);
}
Post::created(function ($post) {
    $message = "*{$post->user->name}* has created _{$post->title}_ post!";

    Beep::slack('#activity')->say($message);
});

Post::created(function ($post) {
    $message = "<b>{$post->user->name}</b> has created <i>{$post->title}</i> post!";

    Beep::hipchat('activity')->say($message);
});

Lumen

Add the service provider in bootstrap/app.php to Register Service Providers block:, (*12)

$app->register(Seleznev\Beep\ServiceProvider::class);
app('beep')->slack('#channel')->say('Lumen');

License

Beep is licensed under The MIT License (MIT)., (*13)

The Versions

14/02 2016

dev-master

9999999-dev https://github.com/seleznevdev/beep

Beep is a lightweight Laravel package for sending notifications to your team via Slack and HipChat

  Sources   Download

MIT

The Requires

 

by Oleg Seleznev

laravel lumen slack hipchat

14/02 2016

0.1.1

0.1.1.0 https://github.com/seleznevdev/beep

Beep is a lightweight Laravel package for sending notifications to your team via Slack and HipChat

  Sources   Download

MIT

The Requires

 

by Oleg Seleznev

laravel lumen slack hipchat

31/01 2016

0.1.0

0.1.0.0 https://github.com/seleznevdev/beep

Beep is a lovely way to notify your team using Slack or HipChat

  Sources   Download

MIT

The Requires

 

by Oleg Seleznev

laravel lumen slack hipchat