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 5d 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

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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