qwince / hipchat-laravel
HipChat PHP Client for Laravel 5
2.0.1
2016-03-21 19:02 UTC
Requires
- php: >=5.4.0
- hipchat/hipchat-php: >=1.0.0
- illuminate/support: 4.x|5.x
This package is not auto-updated.
Last update: 2024-12-16 13:33:18 UTC
README
This a HipChat PHP Client for Laravel 5
Installation
-
Include
"qwince/hipchat-laravel"
inside the"require"
section ofcomposer.json
file:... "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.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,
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);