PHPackages                             hogus/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hogus/laravel-easemob

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hogus/laravel-easemob
=====================

通讯服务端SDK集成

091PHP

Since Nov 14Pushed 7y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

 laravel-easemob
=================

[](#-laravel-easemob-)

 环信即时通讯服务端SDK集成.

Installing
----------

[](#installing)

```
$ composer require hogus/laravel-easemob -vvv
```

Usage
-----

[](#usage)

---

### 注册

[](#注册)

`Easemob::getToken(); // 获取Token `
`Easemob::login($username, $password); // 登陆获取用户token`

`Easemob::register($username, $password); //开放注册`
`Easemob::authorizedRegister($username, $password); // 授权注册`
`Easemob::batchRegister($users, $auth = false);// 批量注册 是否使用授权`

---

\###发送消息

```
//发送文本消息
Easemob::messages('text')->target_type('users')->to('user2')->content('文本内容')->from('user1')->send();
//发送图片
Easemob::messages('img')->target_type('users')->to('user2')->uuid('上传后得到uuid')->filename('文件名')->secret('上传后得到的secret')->width('图片宽')->height('图片高')->from('user1')->send();
//发送语音消息
//发送视频消息
//发送透传消息
```

你还可以

```
$data = [
    'target_type' => 'users',
    'content' => '文本内容',
    'from' => 'user1',
    'to' => 'user2'
];
Easemob::messages('text')->sendData($data);
```

---

\###上传下载

```
//上传文件
Easemob::uploadFile($filePath, $access = false);

//下载文件
Easemob::downloadFile($uuid, $shareSecret, $isThumbnail = false)->save($directory, $filename);
```

---

\###用户管理 TODO

---

\###群组管理 TODO

---

\###聊天室管理 TODO

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/hogus/laravel-easemob/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/hogus/laravel-easemob/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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://www.gravatar.com/avatar/e1d437156710565b6239dfd93b09c2293771f6d244bcb9345fb8942d192bdce5?d=identicon)[hogus2037](/maintainers/hogus2037)

---

Tags

easemoblaravellaravel-easemobsdk

### Embed Badge

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

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

###  Alternatives

[felixnagel/t3extblog

A record based blog extension for TYPO3 CMS. Easy to use and packed with features (incl. comments, subscriptions for comments and posts, Wordpress like subscription manager, reasonable email sending in FE and BE, GDPR ready, BE modules, Dashboard widgets, RSS, Sitemap, ...). Flexible and powerful!

3421.6k](/packages/felixnagel-t3extblog)

PHPackages © 2026

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