PHP code example of seleznev / beep

1. Go to this page and download the library: Download seleznev/beep library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

seleznev / beep example snippets


Seleznev\Beep\ServiceProvider::class,

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

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

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

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

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);
});

$app->register(Seleznev\Beep\ServiceProvider::class);

app('beep')->slack('#channel')->say('Lumen');