PHPackages                             aichenk/tp6-server - 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. [Framework](/categories/framework)
4. /
5. aichenk/tp6-server

ActiveProject[Framework](/categories/framework)

aichenk/tp6-server
==================

tp6基础框架，增加api模块，api支持中间件，支持参数顺序绑定

1.2.2(4y ago)392MITPHPPHP &gt;=7.2.0

Since May 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/aiChenK/tp6-server)[ Packagist](https://packagist.org/packages/aichenk/tp6-server)[ RSS](/packages/aichenk-tp6-server/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (9)Used By (0)

tp6-server
==========

[](#tp6-server)

> - 以thinkphp6框架作为服务代码模板，增加api模块
> - 通过Api控制器实现api模块路由
> - api模块接口支持版本划分，支持restful
> - 通过反射类实现api模块支持tp中间件，使用方式同controller

依赖
--

[](#依赖)

- PHP 7.2+
- composer

使用
--

[](#使用)

- 下载完成后需运行 `composer install`
- 复制`.example.env`为`.env`文件配置
- `app\helper\Di`类通过注释设置`@property`可增加ide提示
- api模块下支持多级路面，控制器层级间使用`.`连接，如：`api/v1/top.sub.test/index`-&gt;`api/v1/top/sub/test@index`
- api模块下参数为顺序绑定 ```
    /** api/v1/Test.php **/
    public function param($param1, $param2)
    {
        return $this->json([
            'param1' => $param1,
            'param2' => $param2
        ]);
    }

    // 访问 http://xxx/api/v1/test/param/aaa/bbb
    // 输出：{"param1":"aaa","param2":"bbb"}
    ```

验证
--

[](#验证)

- 执行：`curl http://xxxx/api/v1/test`
- 执行：`curl -X POST http://xxxx/api/v1/test`

更新
--

[](#更新)

2022-03-15 - v1.2.2

- 去除`composer.lock`文件

2020-11-05 - v1.2.0

- 去除`index.php`全局变量
- 开启强制路由

2020-10-28 - v1.1.1

- 使用`tp-session`替换中间件session实现

2020-06-20 - v1.1.0

- `config/app.php`中增加`api_exception_handle`配置，处理api模块异常
- api模块异常默认返回json格式

2020-05-29 - v1.0.2

- 开启路由功能
- `BaseController`引入`TraitReturn`，统一返回结构

2020-05-28 - v1.0.1

- 修复Api路由，Post请求无法访问`indexPost`方法

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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

Recently: every ~158 days

Total

8

Last Release

1516d ago

### Community

Maintainers

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

---

Top Contributors

[![aiChenK](https://avatars.githubusercontent.com/u/15376814?v=4)](https://github.com/aiChenK "aiChenK (9 commits)")

### Embed Badge

![Health badge](/badges/aichenk-tp6-server/health.svg)

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

###  Alternatives

[topthink/think

the new thinkphp framework

8.0k1.2M13](/packages/topthink-think)[jaguarjack/catchadmin

The CatchAdmin Background management

8962.6k](/packages/jaguarjack-catchadmin)

PHPackages © 2026

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