PHPackages                             exercisebook/discuzq-routedemo - 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. exercisebook/discuzq-routedemo

ActiveLibrary

exercisebook/discuzq-routedemo
==============================

DiscuzQ Route Demo

1103PHP

Since Sep 18Pushed 5y ago2 watchersCompare

[ Source](https://github.com/ExerciseBook/DiscuzQ-RouteDemo)[ Packagist](https://packagist.org/packages/exercisebook/discuzq-routedemo)[ RSS](/packages/exercisebook-discuzq-routedemo/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

概述
==

[](#概述)

Discuz Q 二开样例 - 添加自己的路由

配置
==

[](#配置)

1. 使用指令 `composer require exercisebook/discuzq-routedemo` 下载本库。
2. 在 `config/config.php` 中的 `providers` 添加 `ExerciseBook\DiscuzQRouteDemo\RouteProvider::class` 使得 DiscuzQ 可以正常加载本库。
3. 将 `route/web.php` 中的 `$route->get('/{other:.*}', 'other', \App\Http\Controller\IndexController::class);` 这行注释掉以确保路由不冲突。

代码流程解释
======

[](#代码流程解释)

对于 API 路由
---------

[](#对于-api-路由)

1. 官方文档：
2. 先看 `RouteProvider.php` 文件中的 `boot()` 函数。
3. 再看 `TestApiController.php`。
4. 最后看 `TestApiSerializer.php`。

对于页面路由
------

[](#对于页面路由)

1. 先看 `RouteProvider.php` 文件中的 `boot()` 函数。
2. 再看 `TestViewController.php`。

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity34

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/4807cad8be9b3b28d71d15eed1da2f988b69ec494a291e580b570139a11245b0?d=identicon)[Eric\_Lian](/maintainers/Eric_Lian)

---

Top Contributors

[![ExerciseBook](https://avatars.githubusercontent.com/u/6327311?v=4)](https://github.com/ExerciseBook "ExerciseBook (8 commits)")

---

Tags

discuzq

### Embed Badge

![Health badge](/badges/exercisebook-discuzq-routedemo/health.svg)

```
[![Health](https://phpackages.com/badges/exercisebook-discuzq-routedemo/health.svg)](https://phpackages.com/packages/exercisebook-discuzq-routedemo)
```

PHPackages © 2026

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