PHPackages                             nabeelalihashmi/ib-php-router-fork - 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. nabeelalihashmi/ib-php-router-fork

ActiveLibrary[Framework](/categories/framework)

nabeelalihashmi/ib-php-router-fork
==================================

simple router class for php

v2.5.0(2y ago)05MITPHPPHP &gt;=7.2.5

Since May 29Pushed 2y agoCompare

[ Source](https://github.com/nabeelalihashmi/ib-php-router-fork)[ Packagist](https://packagist.org/packages/nabeelalihashmi/ib-php-router-fork)[ Docs](https://github.com/izniburak/php-router)[ Fund](https://buymeacoff.ee/izniburak)[ GitHub Sponsors](https://github.com/izniburak)[ RSS](/packages/nabeelalihashmi-ib-php-router-fork/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Router
------

[](#router)

```
  _____  _    _ _____             _____             _
 |  __ \| |  | |  __ \           |  __ \           | |
 | |__) | |__| | |__) |  ______  | |__) |___  _   _| |_ ___ _ __
 |  ___/|  __  |  ___/  |______| |  _  // _ \| | | | __/ _ \ '__|
 | |    | |  | | |               | | \ \ (_) | |_| | ||  __/ |
 |_|    |_|  |_|_|               |_|  \_\___/ \__,_|\__\___|_|

```

**PHP Router**, which also has rich features like Middlewares and Controllers is simple and useful router class for PHP.

[![Tests](https://github.com/izniburak/php-router/actions/workflows/run-tests.yml/badge.svg)](https://github.com/izniburak/php-router/actions/workflows/run-tests.yml/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/c3f278e0e3776a64aba315a14a07834939f200e25fad21665d035c70d4f5b275/68747470733a2f2f706f7365722e707567782e6f72672f697a6e69627572616b2f726f757465722f642f746f74616c2e737667)](https://packagist.org/packages/izniburak/router)[![Latest Stable Version](https://camo.githubusercontent.com/f76057ad79a7382b0c2900e4914988775efe74fb9080f3a4f4ef30798b78d7dc/68747470733a2f2f706f7365722e707567782e6f72672f697a6e69627572616b2f726f757465722f762f737461626c652e737667)](https://packagist.org/packages/izniburak/router)[![Latest Unstable Version](https://camo.githubusercontent.com/e9a5caa2f38844eccb58bc3a42e12212a436f153a742e75d0745c176e3739e56/68747470733a2f2f706f7365722e707567782e6f72672f697a6e69627572616b2f726f757465722f762f756e737461626c652e737667)](https://packagist.org/packages/izniburak/router)[![License](https://camo.githubusercontent.com/91f71dd27c64dc1640cc04d1535809407eeafcfe46c41078fcf1cd1175b58010/68747470733a2f2f706f7365722e707567782e6f72672f697a6e69627572616b2f726f757465722f6c6963656e73652e737667)](https://packagist.org/packages/izniburak/router)

### Features

[](#features)

- Supports GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD, AJAX and ANY request methods
- Easy access and manage Request and Response via `symfony/http-foundation` package.
- Controllers support (Example: HomeController@about)
- Before and after Route Middlewares support
- Static Route Patterns
- Dynamic Route Patterns
- Easy-to-use patterns
- Adding a new pattern supports. (with RegExp)
- Namespaces supports.
- Group Routing
- Custom 404 and Exception handling
- Debug mode (Error message open/close)

Install
-------

[](#install)

To install **PHP Router**, You can run the following command directly at your project path in your console:

```
$ composer require izniburak/router

```

OR you can add following lines into the `composer.json` file manually:

```
{
    "require": {
        "izniburak/router": "^2.0"
    }
}
```

Then, run the following command:

```
$ composer install

```

Example Usage
-------------

[](#example-usage)

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

use Buki\Router\Router;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

$router = new Router;

// For basic GET URI
$router->get('/', function(Request $request, Response $response) {
    $response->setContent('Hello World');
    return $response;

    # OR
    # return 'Hello World!';
});

// For basic GET URI by using a Controller class.
$router->get('/test', 'TestController@main');

// For auto discovering all methods and URIs
$router->controller('/users', 'UserController');

$router->run();
```

Docs
----

[](#docs)

Documentation page: [Buki\\Router Docs](https://github.com/izniburak/php-router/wiki)

Changelogs: [Buki\\Router Changelogs](https://github.com/izniburak/php-router/wiki/Changelogs)

Support
-------

[](#support)

[izniburak's homepage](http://burakdemirtas.org)

[izniburak's twitter](https://twitter.com/izniburak)

Licence
-------

[](#licence)

[MIT Licence](http://opensource.org/licenses/MIT)

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

[](#contributing)

1. Fork it (  )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request

Contributors
------------

[](#contributors)

- [izniburak](https://github.com/izniburak) İzni Burak Demirtaş - creator, maintainer

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.9% 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

1079d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/449341cf2d2c255eeaa52f06da4293fdcf2f407b10984846b6c130418c7b4eab?d=identicon)[nabeelalihashmi](/maintainers/nabeelalihashmi)

---

Top Contributors

[![izniburak](https://avatars.githubusercontent.com/u/4693615?v=4)](https://github.com/izniburak "izniburak (104 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (5 commits)")[![nabeelalihashmi](https://avatars.githubusercontent.com/u/14184842?v=4)](https://github.com/nabeelalihashmi "nabeelalihashmi (2 commits)")[![kaiqueprazeres](https://avatars.githubusercontent.com/u/8811194?v=4)](https://github.com/kaiqueprazeres "kaiqueprazeres (1 commits)")

---

Tags

routerroutingroute

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nabeelalihashmi-ib-php-router-fork/health.svg)

```
[![Health](https://phpackages.com/badges/nabeelalihashmi-ib-php-router-fork/health.svg)](https://phpackages.com/packages/nabeelalihashmi-ib-php-router-fork)
```

###  Alternatives

[pecee/simple-router

Simple, fast PHP router that is easy to get integrated and in almost any project. Heavily inspired by the Laravel router.

696214.6k17](/packages/pecee-simple-router)[izniburak/router

simple router class for php

23522.6k7](/packages/izniburak-router)[heropoo/routing

A simple and fast route. Use tree structure storage, fast matching!

115.6k1](/packages/heropoo-routing)[ecoal95/php-router

Minimal routing library

271.0k1](/packages/ecoal95-php-router)[thewunder/croute

Convention based routing for PHP

1317.4k](/packages/thewunder-croute)[developermarius/simple-router

Simple, fast PHP router that is easy to get integrated and in almost any project. Heavily inspired by the Laravel router.

112.4k](/packages/developermarius-simple-router)

PHPackages © 2026

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