PHPackages                             pinkong/neteasy-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. pinkong/neteasy-yunxin

ActiveLibrary[API Development](/categories/api)

pinkong/neteasy-yunxin
======================

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

0.0.2(7y ago)52.4k1PHP

Since Jan 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/PINKONG/neteasy-yunxin)[ Packagist](https://packagist.org/packages/pinkong/neteasy-yunxin)[ RSS](/packages/pinkong-neteasy-yunxin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)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 pinkong/neteasy-yunxin

```

Then, add the service provider:

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

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

as optional, you can use facade:

```
    'aliases' => [
        'YunXinHelper' => Pinkong\YunXin\YunXinHelper::class,
    ],
```

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

```
$app->register(Pinkong\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="Pinkong\YunXin\YunXinServiceProvider"
```

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

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

Usage
-----

[](#usage)

### 用户

[](#用户)

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

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

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

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

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

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

```

### 消息功能

[](#消息功能)

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

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

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

# 发送自定义系统通知
YunXinHelper::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

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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 ~1 days

Total

2

Last Release

2684d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/342ac2ea697666a4c9e707d3019fb9f000dd291e7026fa525c9ec92bcec26705?d=identicon)[PINKONG](/maintainers/PINKONG)

### Embed Badge

![Health badge](/badges/pinkong-neteasy-yunxin/health.svg)

```
[![Health](https://phpackages.com/badges/pinkong-neteasy-yunxin/health.svg)](https://phpackages.com/packages/pinkong-neteasy-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)
