PHPackages                             boxunphp/router - 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. boxunphp/router

ActiveLibrary[Framework](/categories/framework)

boxunphp/router
===============

PHP路由

v2.1.2(5y ago)03MITPHPPHP ^7.2CI failing

Since Dec 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/boxunphp/router)[ Packagist](https://packagist.org/packages/boxunphp/router)[ RSS](/packages/boxunphp-router/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (9)Used By (0)

router
======

[](#router)

FROM: nikic/fast-route

Usage
-----

[](#usage)

两种配置方式

```
$config = [
    ['method' => 'GET', 'route' => '/aaa[/{id:number}/{age}/ggg[/bbb[/ccc[/ddd]]]]', 'handler' => 'handlerA'],
    ['group' => '/bbb', 'routes' => [
        ['method' => 'GET', 'route' => '/uuu[/{id:number}/{age}/ggg[/bbb[/ccc[/ddd]]]]', 'handler' => 'handlerBU'],
        ['method' => 'GET', 'route' => '/iii[/{id:number}/{age}/ggg[/bbb[/ccc[/ddd]]]]', 'handler' => 'handlerBI'],
        ['method' => 'GET', 'route' => '/ooo[/{id:number}/{age}/ggg[/bbb[/ccc[/ddd]]]]', 'handler' => 'handlerBO'],
    ]],
    ['method' => 'GET', 'route' => '/ccc[/{id:number}]', 'handler' => 'handlerC'],
];
$router = new Router($config);
$uri = '/aaa/10000/18/ggg?a=AAA&b=BBB';
$router->dispatch($method, $uri);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Recently: every ~11 days

Total

8

Last Release

2146d ago

Major Versions

v1.4 → v2.02020-07-03

PHP version history (2 changes)v1.0.0PHP ^7.1

v1.4PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f52e37e1511a3621d9da7fdec2ce64d281b3050a39ec22470b630aa89480b2?d=identicon)[boxunsoft](/maintainers/boxunsoft)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/boxunphp-router/health.svg)

```
[![Health](https://phpackages.com/badges/boxunphp-router/health.svg)](https://phpackages.com/packages/boxunphp-router)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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