PHPackages                             haibin2017/easy-yunxin - 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. haibin2017/easy-yunxin

ActiveLibrary[API Development](/categories/api)

haibin2017/easy-yunxin
======================

网易云信服务端sdk for laravel/lumen

0.07(5y ago)017PHP

Since Jan 4Pushed 5y agoCompare

[ Source](https://github.com/haibin2017/easy-yunxin)[ Packagist](https://packagist.org/packages/haibin2017/easy-yunxin)[ RSS](/packages/haibin2017-easy-yunxin/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (1)Versions (11)Used By (0)

neteasy-yunxin
==============

[](#neteasy-yunxin)

---

[网易云信](https://www.163yun.com/help/documents/18132200658681856) 服务端sdk for Laravel5 / Lumen. based on [salamander-mh/YunXinHelper](https://github.com/salamander-mh/YunXinHelper).

Installation
------------

[](#installation)

Require this package with composer by using the following command:

```
$ composer require haibin2017/easy-yunxin

```

Then, add the service provider:

If you are using Laravel, add the service provider to the providers array in `config/app.php`:

```
[
    'providers' => [
        Woshuo\YunXin\YunXinServiceProvider::class,
    ],
]
```

Laravel 5.5+ 会自动注册服务提供者可过滤

If you are using Lumen, append the following code to `bootstrap/app.php`:

```
$app->register(Woshuo\YunXin\YunXinServiceProvider::class);
```

Configuration
-------------

[](#configuration)

The defaults are set in config/yunxin.php. Copy this file to your own config directory to modify the values. You can publish the config using this command:

```
php artisan vendor:publish --provider="Woshuo\YunXin\YunXinServiceProvider"
```

If you are using Lumen, append the following code to `bootstrap/app.php`:

```
$app->configure('yunxin');
```

Usage
-----

[](#usage)

### 实例化

[](#实例化)

```
use Woshuo\YunXin\Entrance;

$appKey = config('yunxin.app_key');
$appSecret = config('yunxin.app_secret');
$helper = new Entrance($appKey, $appSecret);
$user = $helper->user();
$chat = $helper->chat();

```

### 用户

[](#用户)

```
# 创建用户
$user->create($accid, $name, $icon);

# 用户基本信息更新
$user->update($accid, $token);

# 封禁用户
$user->block($accid);

# 解禁用户
$user->unblock($accid);

# 更新用户名片
$user->updateUserInfo($accid, $name, $icon);

# 批量获取用户名片
$user->getUserInfos($accids);

```

### 消息功能

[](#消息功能)

```
# 文本消息
$chat->sendTextMsg($accidFrom, $to, $open, $text);

# 图片消息
$chat->sendPictureMsg($accidFrom, $to, $open,
        $picName, $picMD5, $picUrl, $picExt, $picWidth, $picHeight, $picSize);

# 批量文本消息
$chat->sendTextBatchMsg($accidFrom, $accidsTo, $text);

# 发送自定义系统通知
$chat->sendAttachMsg($from, CHAT::CHAT_ONT_TO_ONE, $to, $attach);

```

License
-------

[](#license)

The package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

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.

###  Release Activity

Cadence

Every ~63 days

Recently: every ~16 days

Total

10

Last Release

2116d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d5644e6a34f74232ae3fefdd305acce15a1cbef3e497d68eff6c6d49b71f131?d=identicon)[haibin2017](/maintainers/haibin2017)

---

Top Contributors

[![haibin2017](https://avatars.githubusercontent.com/u/30611593?v=4)](https://github.com/haibin2017 "haibin2017 (15 commits)")

### Embed Badge

![Health badge](/badges/haibin2017-easy-yunxin/health.svg)

```
[![Health](https://phpackages.com/badges/haibin2017-easy-yunxin/health.svg)](https://phpackages.com/packages/haibin2017-easy-yunxin)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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