PHPackages                             andyvanee/miniroute - 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. andyvanee/miniroute

ActiveLibrary[Framework](/categories/framework)

andyvanee/miniroute
===================

A minimal router for PHP

0.0.1(7y ago)016MITPHP

Since Jan 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/andyvanee/miniroute)[ Packagist](https://packagist.org/packages/andyvanee/miniroute)[ RSS](/packages/andyvanee-miniroute/feed)WikiDiscussions master Synced 3d ago

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

MiniRoute
=========

[](#miniroute)

A minimal router/application framework for PHP. This code is **pre-alpha** and is therefore subject to change in very substantial ways!

### Install

[](#install)

```
composer require andyvanee/miniroute

```

### Usage

[](#usage)

There are a million ways that you could set up your application, but the recommended structure is something like the following:

- src/MyApp/Controller
    - HomeController.php
- public
    - index.php
    - configuration.php
    - routes.php

#### `src/MyApp/Controller/HomeController.php`

[](#srcmyappcontrollerhomecontrollerphp)

```
namespace MyApp\Controller;

class HomeController {
    public function __construct($container) {
        // Setup anything that is common to all routes in this controller
    }
    public function index($request, $response) {
        // Handle this route
    }
}
```

#### `public/index.php`

[](#publicindexphp)

```
require '../vendor/autoload.php';

$app = new MiniRoute\MiniRoute;
require 'configuration.php';
require 'routes.php';
$app->run();
```

#### `public/configuration.php`

[](#publicconfigurationphp)

```
$app->register('helloservice', function() {
    return 'Hello Service';
});
```

#### `public/routes.php`

[](#publicroutesphp)

```
use MyApp\Controller\HomeController;
$app->route('GET', '/', [HomeController::class, 'index']);
```

If you want to have more control over application-wide behaviour and functionality, you can either subclass `MiniRoute`, or create a base class such as `AppController` that all of your controllers will inherit from.

### Run Tests

[](#run-tests)

```
cd andyvanee/miniroute && composer run test

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

2688d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09ea741eb707c8cb81cb42811e3080efe58f2087df7e5e6808687d819119f3c9?d=identicon)[andyvanee](/maintainers/andyvanee)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andyvanee-miniroute/health.svg)

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

###  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)
