Package Data | |
---|---|
Maintainer Username: | spitalia |
Maintainer Contact: | stefano@qwince.com (Stefano Todaro) |
Package Create Date: | 2016-07-28 |
Package Last Update: | 2016-07-28 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-12 15:01:23 |
Package Statistics | |
---|---|
Total Downloads: | 13 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 5 |
Total Forks: | 1 |
Total Open Issues: | 0 |
This a HipChat PHP Client for Laravel 5
Include "qwince/hipchat-laravel"
inside the "require"
section of composer.json
file:
...
"require": {
...,
"qwince/hipchat-laravel": "dev-master"
}
...
Update composer dependencies by running:
composer update
Insert 'Qwince\HipchatLaravel\HipchatLaravelServiceProvider',
in your 'providers'
array, inside app/config/app.php
:
...
'providers' => [
...
Qwince\HipchatLaravel\HipchatLaravelServiceProvider::class,
],
Insert 'HipChat' => Qwince\HipchatLaravel\Facade\HipChat:class,
in your 'aliases'
array, inside app/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.php
file updating it your credentials / configurations:
'server' => 'insert_your_url',
'api_token' => 'insert_your_api_token',
'app_name' => 'Your App Name',
'default_room' => 1234,
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);