PHPackages                             tinylara/tinyroute - 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. tinylara/tinyroute

Abandoned → [tinylara/tinyrouter](/?search=tinylara%2Ftinyrouter)Library[Framework](/categories/framework)

tinylara/tinyroute
==================

Tiny PHP router based on Macaw.

v2.2(10y ago)171231MITPHPPHP &gt;=5.4.0

Since Jan 14Pushed 10y ago4 watchersCompare

[ Source](https://github.com/TinyLara/TinyRoute)[ Packagist](https://packagist.org/packages/tinylara/tinyroute)[ RSS](/packages/tinylara-tinyroute/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (6)Used By (0)

TinyLara\\TinyRouter
====================

[](#tinylaratinyrouter)

[![Latest Stable Version](https://camo.githubusercontent.com/01978e8fb6087accedf4840401198d4c67fbea45f8061e71f6d72a5f00f4570d/68747470733a2f2f706f7365722e707567782e6f72672f74696e796c6172612f74696e79726f757465722f762f737461626c652e737667)](https://packagist.org/packages/tinylara/tinyrouter) [![Total Downloads](https://camo.githubusercontent.com/102dba9abf5161e13b5b8af469406e5cdbf9c36e3436de30ddf76dada68ec99e/68747470733a2f2f706f7365722e707567782e6f72672f74696e796c6172612f74696e79726f757465722f646f776e6c6f6164732e737667)](https://packagist.org/packages/tinylara/tinyrouter) [![License](https://camo.githubusercontent.com/28cd352902442d4d9ced0e35261377a01d3cc898818ee351a8e4dfab53d631c1/68747470733a2f2f706f7365722e707567782e6f72672f74696e796c6172612f74696e79726f757465722f6c6963656e73652e737667)](https://packagist.org/packages/tinylara/tinyrouter)

TinyRouter is a tiny PHP router based on [Macaw](https://github.com/NoahBuscher/Macaw). [Read the documentation.](https://github.com/TinyLara/TinyLara/wiki/Routing)

### Install

[](#install)

If you have Composer, just include TinyRouter as a project dependency in your `composer.json`. If you don't just install it by downloading the .ZIP file and extracting it to your project directory.

```
require: {
    "tinylara/tinyrouter": "*"
}

```

### Examples

[](#examples)

```
use TinyLara\TinyRouter\TinyRouter as Route;

Route::get('/', 'HomeController@home');

// GET
Route::get('foo', function() {
  echo "GET Foo!";
});
// POST
Route::post('foo', function() {
  echo "POST Foo!";
});
// ANY: GET or POST
Route::any('foo', function() {
  echo "ANY Foo!";
});

Route::error(function() {
  throw new Exception("404 Not Found");
});

Route::dispatch();
```

The `Route::dispatch()` function can receive a parameter as the Processor After. It will process the value returned by Controller. Example:

```
Route::dispatch('View@process');
```

If you don't specify an error callback, it will just echo `404`. ### License

[](#license)

The TinyRouter is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

3857d ago

Major Versions

v1.1 → v2.02015-03-12

PHP version history (2 changes)v1.0PHP &gt;=5.3.3

v2.2PHP &gt;=5.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2127912?v=4)[吕文翰](/maintainers/JohnLui)[@johnlui](https://github.com/johnlui)

---

Top Contributors

[![johnlui](https://avatars.githubusercontent.com/u/2127912?v=4)](https://github.com/johnlui "johnlui (17 commits)")

### Embed Badge

![Health badge](/badges/tinylara-tinyroute/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[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.

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

A simple API extension for DateTime.

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

PHPackages © 2026

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