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

ActiveLibrary

mosz/simple-router
==================

Simple MVC Router for php

v1.0(3y ago)010PHP

Since Jul 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mOszz/SimpleRouter)[ Packagist](https://packagist.org/packages/mosz/simple-router)[ RSS](/packages/mosz-simple-router/feed)WikiDiscussions main Synced 1mo ago

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

SimpleRouter
============

[](#simplerouter)

Simple object oriented Router for php

- Support `GET`, `POST` methods

Installation
------------

[](#installation)

Run the following command

```
composer require mosz/simple-router

```

Usage
-----

[](#usage)

basic index.php file

```
// Require composer autoloader
require __DIR__ . '/vendor/autoload.php';

// Create Router instance
$router = new mOsz\Router\Router($_SERVER['REQUEST_URI']);

// Add routes
$router->get('path', function(){ ... });

$router->run();
```

#### Routes utilisation :

[](#routes-utilisation-)

- Basic use

```
$router->get('HelloWorld', function(){ echo "Hello World"; });
```

#### MVC

[](#mvc)

- GET method

```
$router->get('Homepage', function(){ $controller = new Test\Controller; $controller->index(); });
```

- GET method with params

```
$router->get('posts/{id}', function($id) { $controller = new Test\Controller; $controller->posts($id); });
```

- POST method

```
$router->get('form', function() { $controller = new Test\Controller; $controller->form(); });
```

Form traitement example

```
$router->post('form', function() { $controller = new Test\Controller; $controller->form(); });
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

1381d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/42c53cbaa763de0ca210d29174b534cfed96e87f5664f06fd054f189dc6f4679?d=identicon)[mOszz](/maintainers/mOszz)

---

Top Contributors

[![mOszz](https://avatars.githubusercontent.com/u/63888623?v=4)](https://github.com/mOszz "mOszz (10 commits)")

---

Tags

libraryphprouterrouting

### Embed Badge

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

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

PHPackages © 2026

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