PHPackages                             zhangxiaoshuai/easemob - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. zhangxiaoshuai/easemob

ActiveLibrary[API Development](/categories/api)

zhangxiaoshuai/easemob
======================

022PHP

Since Aug 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/1115656547/easemob)[ Packagist](https://packagist.org/packages/zhangxiaoshuai/easemob)[ RSS](/packages/zhangxiaoshuai-easemob/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

1. 基于Laravel4.2写的环信[http://www.easemob.com/customer/im服务端扩展包](http://www.easemob.com/customer/im%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%89%A9%E5%B1%95%E5%8C%85)
2. 使用此插件请先查阅并且读懂对应的环信即时通讯云V3.0 服务端集成API
3. Composer安装

    在composer.json文件中的require加入 "require": { "zhangxiaoshuai/easemob":"dev-master" }
4. 在项目下执行

    $ composer update
5. 发布配置文件

    $ php artisan config:publish Zhangxiaoshuai/Easemob
6. 配置Config

    在项目app/config/packages你会找到一个zhangxiaoshuai/easemob/config.php,然后设置里面的参数
7. 注册包

    在项目的app/config/app.php下的providers方法添加 'providers' =&gt; array( 'Zhangxiaoshuai\\Easemob\\EasemobServiceProvider' ) 在aliases方法中加入 'aliases' =&gt; array( // ... 'Easemob' =&gt;'Zhangxiaoshuai\\Easemob\\Facade\\Easemob' ) 8）Usage

    // 授权单个注册 Easemob::createUser($username, $password, $nickname) // $nickname可以为空 // 添加好友 Easemob::addFriend($owner\_username, $friend\_username) // $owner\_username 是要添加好友的用户名，$friend\_username 是被添加的用户名 // 解除好友关系 Easemob::deleteFriend($owner\_username, $friend\_username) // $owner\_username 是要解除好友的用户名，$friend\_username 是被解除的用户名 // 查看好友； Easemob::showFriends($username) // $username好友的用户名 // 查看在线情况 Easemob::isOnline($username) // 查看用户离线消息数 Easemob::getOfflineMessages($username) // 查看某条消息的离线状态 // ----deliverd 表示此用户的该条离线消息已经收到 Easemob::getOfflineMessageStatus($username, $msg\_id) //$msg\_id API 有解释 // 发送文本消息 Easemob::sendText($from, $target\_type, $target, $content); // $from 表示消息发送者 // $target\_type ='user' 给用户发消息，并非是群发消息 // $target 注意这里需要用数组，数组长度建议不大于20，即使只有一个用户，也要用数组 \['u1'\]，给用户发送时数组元素是用户名 // $content 发送的内容 // 查看整个项目的聊天记录 Easemob::getChatRecord()

    备注：暂时只写了这几个常用的API

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12796030?v=4)[Zhangxiaoshuai](/maintainers/Zhangxiaoshuai)[@zhangxiaoshuai](https://github.com/zhangxiaoshuai)

---

Top Contributors

[![ZhangHaiJia](https://avatars.githubusercontent.com/u/10540153?v=4)](https://github.com/ZhangHaiJia "ZhangHaiJia (9 commits)")

### Embed Badge

![Health badge](/badges/zhangxiaoshuai-easemob/health.svg)

```
[![Health](https://phpackages.com/badges/zhangxiaoshuai-easemob/health.svg)](https://phpackages.com/packages/zhangxiaoshuai-easemob)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
