2017 © Pedro Peláez
 

library easemob

easemob

image

limingxinleo/easemob

easemob

  • Friday, January 6, 2017
  • by limingxinleo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

easemob

Total Downloads Latest Stable Version Latest Unstable Version License, (*1)

安装方法

composer require limingxinleo/easemob

使用方法

  • 初始化
use limx\tools\Easemob;
$option = [
    'client_id' => env('EASEMOB_ID'),
    'client_secret' => env('EASEMOB_SECRET'),
    'org_name' => env('EASEMOB_ORG_NAME'),
    'app_name' => env('EASEMOB_APP_NAME'),
];
$easemob = new Easemob($option);
  • 发送环信
$res = $easemob->sendToUsers(['receiver'], 'sender', ['msg' => '环信测试']);
  • 设置StorageAdapter
$easemob->setStorageAdapter(function ($data) {
    $file = BASE_PATH . '/storage/cache/data/huanxin';
    if ($data) {
        // 存储
        file_put_contents($file, $data);
    } else {
        if (file_exists($file)) {
            return file_get_contents($file);
        }
        return false;
    }
});

The Versions

06/01 2017

dev-master

9999999-dev

easemob

  Sources   Download

MIT

The Requires

 

05/01 2017

1.1.1

1.1.1.0

easemob

  Sources   Download

MIT

The Requires

 

05/01 2017

1.1.0

1.1.0.0

easemob

  Sources   Download

MIT

The Requires

 

05/01 2017

1.0.0

1.0.0.0

easemob

  Sources   Download

MIT

The Requires