notifymehq/laravel5
Composer 安装命令:
composer require notifymehq/laravel5
包简介
Provides a laravel bridge for notifyme
README 文档
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).
统计信息
- 总下载量: 234
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 35
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-18