承接 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
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

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