定制 polygon/realtimeco 二次开发

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

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

polygon/realtimeco

Composer 安装命令:

composer require polygon/realtimeco

包简介

A package which provides a simple way to integrate realtime.co to your application

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require polygon/realtimeco.

"require": {
	"polygon/realtimeco": "dev-master"
}

Next, update Composer from the Terminal:

composer update

Once this operation completes, the next step is to add the service provider. Open config/app.php, and add a new item to the providers array.

'Poligon\Realtimeco\RealtimecoServiceProvider',

Now add the alias.

'aliases' => array(
    ...
	'Realtimeco' => 'Polygon\Realtimeco\Facades\RealtimecoFacade',
)

From the terminal run:

php artisan vendor:publish

a configuration file should be added to config/ folder, called realtimeco.php.

Set this variables in your .env file

REALTIME_URL=http://ortc-developers.realtime.co/server/2.1 REALTIME_APP_KEY=YOUR_APPLICATION_KEY REALTIME_PRIVATE_KEY=YOUR_APPLICATION_PRIVATE_KEY REALTIME_TOKEN=dummyToken

You can get this info after creating an account at: http://www.realtime.co/

Usage example

    $channel = 'my_channel';
    $permission = 'w';
    $private = 0;
    $ttl = 180000;
    $message = ['status' => 'ok', 'msg' => 'Some message'];
    $realtime = new Realtimeco(App::call('config'));
    $realtime->auth([$channel => $permission],$private,$ttl);
    $realtime->send($channel, json_encode($message));

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固