PHPackages                             lengnuan-v/yii2-message - 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. lengnuan-v/yii2-message

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

lengnuan-v/yii2-message
=======================

yii2 message

03

Since Aug 16Compare

[ Source](https://github.com/lengnuan-v/yii2-message)[ Packagist](https://packagist.org/packages/lengnuan-v/yii2-message)[ RSS](/packages/lengnuan-v-yii2-message/feed)WikiDiscussions Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-message
============

[](#yii2-message)

A simple private message extension for yii2, only contain model and API, no web interface.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
 composer require --prefer-dist lengnuan-v/yii2-message "dev-master"

```

or add

```
"lengnuan-v/yii2-message": "*"

```

to the require section of your `composer.json` file.

Then

```
 php yii migrate/up --migrationPath=@vendor/lengnuan-v/yii2-message/src/migrations

```

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

[](#configuration)

To use this extension, simply add the following code in your application configuration:

```
return [
    //....
    'components' => [
        'message' => [
            'class' => 'lengnuan\message\Message',
        ],
    ],
];
```

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
// 发送一条消息.
Yii::$app->message->send($userId = 12, $title = 'How are u?', $message = 'How are u?');

// 回复一条消息
Yii::$app->message->reply($messageId = 2100, $message = 'Fine, and u?');

// 返回一条消息
Yii::$app->message->getMessage($messageId = 2100);

// 获取列表
Yii::$app->message->messageList($userId = 12, $status = null, $cate = 'to', $page = 1, $limit = 20, $orderBy = ['id' => SORT_DESC]);

// 获取对话中的消息列表
Yii::$app->message->getMessage($dialogueHash = '4795342d74935999cc82ded1b589072c');

// 删除一条消息
Yii::$app->message->del($dialogueHash = '4795342d74935999cc82ded1b589072c');

// 设置消息已读状态
Yii::$app->message->setMessageRead($dialogueHash = '4795342d74935999cc82ded1b589072c');
```

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

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

---

Top Contributors

[![lengnuan-v](https://avatars.githubusercontent.com/u/45681358?v=4)](https://github.com/lengnuan-v "lengnuan-v (10 commits)")

### Embed Badge

![Health badge](/badges/lengnuan-v-yii2-message/health.svg)

```
[![Health](https://phpackages.com/badges/lengnuan-v-yii2-message/health.svg)](https://phpackages.com/packages/lengnuan-v-yii2-message)
```

###  Alternatives

[typo3/cms-rte-ckeditor

TYPO3 CMS RTE CKEditor - Integration of CKEditor as a Rich Text Editor for the TYPO3 backend.

199.3M234](/packages/typo3-cms-rte-ckeditor)[voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

274.2M8](/packages/voku-urlify)[appstract/laravel-meta

Model meta

13089.1k](/packages/appstract-laravel-meta)[spatie/laravel-mailcoach-monaco

A Monaco editor package for Mailcoach

1017.4k1](/packages/spatie-laravel-mailcoach-monaco)[octopoda/octopus

PHP Sitemap crawler

115.0k](/packages/octopoda-octopus)

PHPackages © 2026

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