notifymehq/laravel

This package is abandoned and no longer maintained. No replacement package was suggested.

Provides a laravel bridge for notifyme

dev-master / 1.0.x-dev 2016-06-07 08:41 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:53:58 UTC


README

This is the Laravel 5 Bridge for NotifyMe.

Installation

Either PHP 5.5+ or HHVM 3.6+ are required.

To get the latest version of NotifyMe Laravel, simply require the project using Composer:

$ composer require notifymehq/laravel

Instead, you may of course manually update your require block and run composer update if you so choose:

{
    "require": {
        "notifymehq/laravel": "^1.0"
    }
}

Note that installing that package only pulls in the bare minimum and will not give you any adapters. You may require the adapters indiviually, or, require the whole deal (notifymehq/notifyme).

Add the service provider to app.php

'providers' => [
    // ...
    'NotifyMeHQ\Laravel\NotifyMeServiceProvider',
],

If you want to use the Facade, also add the alias:

'aliases' => [
    // ...
    'NotifyMe'  => 'NotifyMeHQ\Laravel\Facades\NotifyMe',
],

Install the configuration file.

$ php artisan config:publish

Configure your connections.

return [
    'default' => 'slack',
    'connections' => [
        'slack' => [
            'driver' => 'slack',
            'from'   => 'notifyme',
            'token'  => 'your-token',
        ],
        'webhook' => [
            'driver' => 'webhook',
        ],
    ],
];

Usage

$response = NotifyMe::notify('#tests', 'This is working awesome!');

echo $response->isSent() ? 'Message sent' : 'Message going nowhere';
$response = NotifyMe::connection('slack')->notify('#tests', 'This is working awesome!');

echo $response->isSent() ? 'Message sent' : 'Message going nowhere';

For more information about the usage go to NotifyMe.

License

NotifyMe is licensed under The MIT License (MIT).