定制 stiko/hipchat-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stiko/hipchat-laravel

Composer 安装命令:

composer require stiko/hipchat-laravel

包简介

Simple hipchat notification for laravel projects.

README 文档

README

A simple hipchat nitification for laravel/Lumen

Laravel Installation

  • Require composer
composer require stiko/hipchat-laravel
  • Add ServiceProvider to app/config/app.php:
...
'providers' => [
    ...
    HipchatNotification\HipchatLaravelServiceProvider::class,
],
  • Publish
php artisan vendor:publish --provider="HipchatNotification\HipchatLaravelServiceProvider"
  • Lastly, add env variables to .env file
HIPCHAT_TOKEN=YourTokenhere
HIPCHAT_URL=YourhipchatUrlHere

Lumen Installation

  • Require composer
composer require stiko/hipchat-laravel
  • Add ServiceProvider to bootstrap/app.php:
...
//Hipchat provider
$app->register('HipchatNotification\HipchatLaravelServiceProvider');
  • Copy src/config/hipchat.php to config/hipchat.php

  • Lastly, add env variables to .env file

HIPCHAT_TOKEN=YourTokenhere
HIPCHAT_URL=YourhipchatUrlHere

Get Token

  1. Log in to Hipchat
  2. click Integration
  3. Choose your room then click Build your own Integration
  4. In the section Send messages to this room you can find your url and token Hichat url and token

Usage

  • The simplest way to start is
use HipchatNotification\Hipchat;
...
$hipchat = new Hipchat();
$hipchat->send();

This will send a message to the room with the default settings.

  • To change the message:
$hipchat = new Hipchat();
$hipchat->message('your messsage here');
$hipchat->send();
  • Message format allowed html, text(default):
$hipchat = new Hipchat();
$hipchat->messageformat('html');
$hipchat->send();
  • To turn off room notfication (on by default):
$hipchat = new Hipchat();
$hipchat->notify(false);
$hipchat->send();
  • To cahnge color, allowed (yellow, green(default), red, purple, gray, random):
$hipchat = new Hipchat();
$hipchat->color(green);
$hipchat->send();

  • Or you could suply a full array of options:
$hipchat = new Hipchat();
$hipchat->options(
	array(
		'color' => 'green',
		'message' => 'Your message',
		'notify' => true,
		'message_format' => 'text',
	)
);
$hipchat->send();

统计信息

  • 总下载量: 368
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-07-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固