notifymehq / laravel
Provides a laravel bridge for notifyme
Requires
- php: >=5.5.9
- graham-campbell/manager: ^2.3
- illuminate/contracts: 5.1.*|5.2.*|5.3.*
- illuminate/support: 5.1.*|5.2.*|5.3.*
- notifymehq/contracts: ^1.0
- notifymehq/factory: ^1.0
Requires (Dev)
- graham-campbell/testbench: ^3.1
- phpunit/phpunit: ^4.8|^5.0
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).