PHPackages                             libo/tp5-doc - 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. libo/tp5-doc

ActiveThink-extend[API Development](/categories/api)

libo/tp5-doc
============

just for tp5 make the api document auto.

v2.9(7y ago)1651MITPHPPHP &gt;=5.6.0

Since Jan 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/niubea/tp5-doc)[ Packagist](https://packagist.org/packages/libo/tp5-doc)[ Docs](http://www.niubea.com)[ RSS](/packages/libo-tp5-doc/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (31)Used By (0)

tp5-doc
=======

[](#tp5-doc)

just for tp5 make the api document auto.
让使用TP5框架的系统，自动生成接口文档。
一个基于 Thinkphp5 的 api 文档自动生成工具

环境要求：
框架：tp5.1.x 框架
PHP：&gt;= 5.6.x

安装步骤：
1\. 先部署安装好你的TP5.1框架
2\. 项目根目录执行：composer require libo/tp5-doc
3\. 将src下的Doccommon.php拷贝到application/api/controller/目录下，如果没有就创建一个
4\. composer安装好插件的时候，已经自动将src下的config.php拷贝到config目录下的doc.php文件
5\. 修改config下的doc.php，根据你的实际情况填写
6\. doc.php里有static\_path，自己根据实际情况配置静态文件目录
7\. doc.php里的controller指的是需要做文件的控制器类
8\. 控制器类需要按既定的格式写，才会自动生成文档的。格式可以参考我提供的例子：src/libo.php
9\. Doccommon.php 是公共文档说明部分，可以细看一下里面的代码。

注意事项：
1\. 使用nginx的用户， 如果发现静态资源无法访问，你有两个选择，要么将src下的assets目录复制到public/static里，然后修改config/doc.php里的static\_path；要么就修改nginx.conf，将.js,.css,.png,.jpg等这些静态资源的重写规则删掉。

更新日志：
v2.3
更新了多处bug
增加自定义html可以使用模板的功能

v2.4
注释掉的{$doc}也会报错的，已经删除了

v2.5
更新了README.md

v2.6
优化一下代码

v2.6.1
增加了README.md 说明
修改了config.php里的return\_format说明

用过觉得好的，请打赏一下作者，谢谢！
[![Image text](https://raw.githubusercontent.com/niubea/img-respo/master/pay_qrcode/alipay.jpg)](https://raw.githubusercontent.com/niubea/img-respo/master/pay_qrcode/alipay.jpg)[![Image text](https://raw.githubusercontent.com/niubea/img-respo/master/pay_qrcode/wechat.jpg)](https://raw.githubusercontent.com/niubea/img-respo/master/pay_qrcode/wechat.jpg)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~28 days

Total

30

Last Release

2559d ago

Major Versions

v1.8 → v2.02019-01-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/293be1ed717c3ba946ba0cb6df7807814d3edf357a63f9675d08646344326e11?d=identicon)[pollylee](/maintainers/pollylee)

---

Top Contributors

[![niubea](https://avatars.githubusercontent.com/u/46312081?v=4)](https://github.com/niubea "niubea (43 commits)")

---

Tags

thinkphp5libotp5-doc

### Embed Badge

![Health badge](/badges/libo-tp5-doc/health.svg)

```
[![Health](https://phpackages.com/badges/libo-tp5-doc/health.svg)](https://phpackages.com/packages/libo-tp5-doc)
```

###  Alternatives

[naixiaoxin/think-wechat

EasyWechat For Thnkphp5.1+

27316.1k1](/packages/naixiaoxin-think-wechat)[weiwei/api-doc

The ThinkPHP6 Api Doc Package

10710.2k](/packages/weiwei-api-doc)[topthink/think-api

2015.4k1](/packages/topthink-think-api)

PHPackages © 2026

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