PHPackages                             alkimisti/simplerouter - 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. [API Development](/categories/api)
4. /
5. alkimisti/simplerouter

ActiveLibrary[API Development](/categories/api)

alkimisti/simplerouter
======================

A simple PSR-4 router

041PHP

Since Dec 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Alkimisti/simplerouter)[ Packagist](https://packagist.org/packages/alkimisti/simplerouter)[ RSS](/packages/alkimisti-simplerouter/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple Router
=============

[](#simple-router)

This package is a simple PSR-4 router for PHP.

Install
-------

[](#install)

Via Composer

```
$ composer require alkimisti/simplerouter:dev-main
```

Usage
-----

[](#usage)

```
$router = new Router();
$router->resolve();
```

The first URL segment will be used as the name of the controller; `/home` will instantiate `App\Controllers\HomeController.php`.

The second URL segment will be used as the name of the action/method; `/home/index` will invoke `index()` method in `App\Controllers\HomeController`.

Other segments will be forwarded as method arguments; `/products/show/5` will invoke `show()` method in `App\Controllers\ProductsController`, passing the number `5` as its first argument.

Tutorial:

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Credits
-------

[](#credits)

- \[Tahir Hoxha\]\[link-author\]
- \[All Contributors\]\[link-contributors\]

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/203621?v=4)[Tahir Hoxha](/maintainers/Alkimisti)[@Alkimisti](https://github.com/Alkimisti)

---

Top Contributors

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

---

Tags

psr-4routing

### Embed Badge

![Health badge](/badges/alkimisti-simplerouter/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k13](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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