qwince/hipchat-laravel
Composer 安装命令:
composer require qwince/hipchat-laravel
包简介
HipChat PHP Client for Laravel 5
README 文档
README
This a HipChat PHP Client for Laravel 5
Installation
-
Include
"qwince/hipchat-laravel"inside the"require"section ofcomposer.jsonfile:... "require": { ..., "qwince/hipchat-laravel": "dev-master" } ...
-
Update composer dependencies by running:
composer update -
Insert
'Qwince\HipchatLaravel\HipchatLaravelServiceProvider',in your'providers'array, insideapp/config/app.php:... 'providers' => [ ... Qwince\HipchatLaravel\HipchatLaravelServiceProvider::class, ],
-
Insert
'HipChat' => Qwince\HipchatLaravel\Facade\HipChat:class,in your'aliases'array, insideapp/config/app.php:... 'aliases' => [ ... 'HipChat' => Qwince\HipchatLaravel\Facade\HipChat::class, ],
-
To Publish the configuration files you will need, run:
php artisan vendor:publish --provider="Qwince\HipchatLaravel\HipchatLaravelServiceProvider" -
Edit
app/config/hipchat.phpfile updating it your credentials / configurations:'server' => 'insert_your_url', 'api_token' => 'insert_your_api_token', 'app_name' => 'Your App Name', 'default_room' => 1234,
Usage
-
Notify in a Room
HipChat::setRoom('RoomID'); // or set default in config file HipChat::sendMessage('My Message'); // you have two optional parameters, `color` and `notify` // the 'red' will set the message color, and the third parameter when `true` notify all users on the room HipChat::sendMessage('My Message', 'red', true);
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-07