PHPackages                             ledc/swoole-routes - 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. ledc/swoole-routes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ledc/swoole-routes
==================

think-swoole路由加载器

v7.0.2(10mo ago)08MITPHPPHP &gt;=7.4

Since Jun 20Pushed 10mo agoCompare

[ Source](https://github.com/ledccn/think-swoole-routes)[ Packagist](https://packagist.org/packages/ledc/swoole-routes)[ RSS](/packages/ledc-swoole-routes/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

说明
==

[](#说明)

think-swoole路由加载器

安装
--

[](#安装)

`composer require ledc/swoole-routes`

使用说明
----

[](#使用说明)

### 初始化路由引导文件

[](#初始化路由引导文件)

安装完之后，请执行以下命令，初始化路由引导文件 `php think route:list`

### 注册路由

[](#注册路由)

在服务类 `register` 或 `boot` 方法中添加以下代码（任选一）

```
use Ledc\SwooleRoutes\Autoloader;

// 添加路由文件：子进程重启会重新加载路由文件（即路由规则热更新）
Autoloader::addFile(__DIR__ . '/route.php');

// 添加路由目录：子进程重启会重新扫描目录内的新增路由文件，并加载（即路由文件热更新）
Autoloader::addDirectory(__DIR__ . '/route');
```

测试
--

[](#测试)

执行命令 `php think route:list` 检查路由是否加载成功

官方文档
----

[](#官方文档)

[https://doc.thinkphp.cn/v6\_1/Swoole.html](https://doc.thinkphp.cn/v6_1/Swoole.html)

[https://doc.thinkphp.cn/v8\_0/think\_swoole.html](https://doc.thinkphp.cn/v8_0/think_swoole.html)

捐赠
--

[](#捐赠)

如果项目帮到您，可以请作者喝杯咖啡，深表谢意！

[![reward](reward.png)](reward.png)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance53

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

325d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4af14254189bc74029cc40f4206f8006872b0cd092c680201f204a85a490f143?d=identicon)[ledccn](/maintainers/ledccn)

---

Top Contributors

[![ledccn](https://avatars.githubusercontent.com/u/53997080?v=4)](https://github.com/ledccn "ledccn (3 commits)")

### Embed Badge

![Health badge](/badges/ledc-swoole-routes/health.svg)

```
[![Health](https://phpackages.com/badges/ledc-swoole-routes/health.svg)](https://phpackages.com/packages/ledc-swoole-routes)
```

###  Alternatives

[topthink/think-captcha

captcha package for thinkphp

132934.4k68](/packages/topthink-think-captcha)[topthink/think-worker

workerman extend for thinkphp

202227.2k9](/packages/topthink-think-worker)[yunwuxin/think-cron

计划任务

17416.2k](/packages/yunwuxin-think-cron)[zzstudio/think-addons

The ThinkPHP6 Addons Package

1518.6k](/packages/zzstudio-think-addons)[topthink/think-annotation

Annotation For ThinkPHP

4831.5k8](/packages/topthink-think-annotation)[liliuwei/thinkphp-jump

适用于thinkphp6.0的跳转扩展

2874.4k1](/packages/liliuwei-thinkphp-jump)

PHPackages © 2026

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