PHPackages                             cma/tp6-addons - 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. cma/tp6-addons

ActiveLibrary

cma/tp6-addons
==============

The ThinkPHP6 Addons Package

V1.2.1(4y ago)019Apache-2.0PHPPHP &gt;=7.2.0

Since Nov 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/i-cma/tp6-addons)[ Packagist](https://packagist.org/packages/cma/tp6-addons)[ RSS](/packages/cma-tp6-addons/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

ThinkPHP应用模块介绍
==============

[](#thinkphp应用模块介绍)

应用目录结构
------

[](#应用目录结构)

```
www  WEB部署目录（或者子目录）
├─addons           插件目录
│  ├─controller    控制器目录
│  │  ├─admin      后台控制器目录
│  │  ├─api        API控制器目录
│  │  ├─index      前台控制器目录
│  ├─model         模型目录
│  ├─view          应用前端模板文件
│  ├─ ...          更多类库目录
│  │
│  ├─common.php    公共函数文件
│  ├─config.php    应用介绍配置文件
│  ├─menus.php     应用菜单配置文件
│  ├─Init.php      应用入口文件
│  ├─install.sql   应用安装SQL文件
│  ├─uninstall.sql 应用卸载SQL文件
│  └─event.php     微信回调事件文件
```

config.php 应用介绍配置说明
-------------------

[](#configphp-应用介绍配置说明)

- info：配置应用基本信息
- platform：配置应用支持平台
- mp\_msg：配置应用微信公众号订阅消息，`当 platform.mp == true 时有效`

    - subscribes：订阅事件
    - handles：处理事件 具体请参考微信开发文档： [https://developers.weixin.qq.com/doc/offiaccount/Message\_Management/Receiving\_standard\_messages.html](https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html)

menus.php 菜单配置介绍
----------------

[](#menusphp-菜单配置介绍)

菜单最多支持三级菜单，一级菜单可以配置icon图标，若要引用自定义图标，可以自行导入图标文件。

菜单路径参考TP路由。

若包含`submenu`则表示有下级菜单，若需实现选中菜单高亮或者页面有默认菜单高亮则需要配置`uris`值，值为页面路径。

event.php 微信回调事件通知
------------------

[](#eventphp-微信回调事件通知)

在开发微信公众号项目时，可以接受微信推送的消息订阅。 我们可以通过该文件来接受对应的订阅事件并处理。 文件格式请参考TP6文档-&gt;事件章节 [https://www.kancloud.cn/manual/thinkphp6\_0/1037492](https://www.kancloud.cn/manual/thinkphp6_0/1037492)

install.sql 安装SQL文件
-------------------

[](#installsql-安装sql文件)

安装应用所需SQL文件，文件为标准SQL语句，单独语句用英文分号`;`分割。

uninstall.sql 安装SQL文件
---------------------

[](#uninstallsql-安装sql文件)

卸载应用所需SQL文件，文件为标准SQL语句，单独语句用英文分号`;`分割。

注册事件 / 钩子
---------

[](#注册事件--钩子)

- AddonsBegin ： 应用开始时
- AddonInit ： 应用初始化
- AddonsActionBegin ： 应用方法开始时
- AddonMiddleware ： 应用中间件路由

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

2

Last Release

1505d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c47742fdfdb3565c783db8de43ce00ecb27bb7138023d429712d6bcc9036bf45?d=identicon)[icma](/maintainers/icma)

---

Top Contributors

[![i-cma](https://avatars.githubusercontent.com/u/77428569?v=4)](https://github.com/i-cma "i-cma (6 commits)")

### Embed Badge

![Health badge](/badges/cma-tp6-addons/health.svg)

```
[![Health](https://phpackages.com/badges/cma-tp6-addons/health.svg)](https://phpackages.com/packages/cma-tp6-addons)
```

###  Alternatives

[zzstudio/think-addons

The ThinkPHP6 Addons Package

1518.6k](/packages/zzstudio-think-addons)

PHPackages © 2026

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