PHPackages                             anujsinghwd/anrouter - 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. anujsinghwd/anrouter

ActiveLibrary

anujsinghwd/anrouter
====================

A simple and small routing library

18PHP

Since Mar 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/anujsinghwd/anrouter)[ Packagist](https://packagist.org/packages/anujsinghwd/anrouter)[ RSS](/packages/anujsinghwd-anrouter/feed)WikiDiscussions master Synced 2mo ago

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

anrouter
========

[](#anrouter)

A simple and small PHP Routing

### Installation

[](#installation)

- `composer require anujsinghwd/anrouter`

### Usage

[](#usage)

- First configure `.htaccess`

    ```
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule . index.php [L]
    ```
- `$anrouter = new AnRouter()`
- Simply make function according to your route

### Example

[](#example)

- index.php File ```
    require_once './lib/AnRouter.php';

    $anrouter = new AnRouter();

    $anrouter->get('method_name'); -> For GET REQUEST
    $anrouter->post('method_name'); -> For POST REQUEST
    $anrouter->put('method_name'); -> For PUT REQUEST
    $anrouter->delete('method_name'); -> For DELETE REQUEST

    function method_name()
    {
        echo "Method Called";
    }
    ```
- Above route called by `(http://your_base_url/method_name)`

### Parameter Handling

[](#parameter-handling)

- Pass with request ```
    $anrouter->get('method_name', array('agr1' => $val))
    ```
- Getting the Parameter in function ```
    function method_name($param)
    {
        echo $param;
    }
    ```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e4ba777bcf58a54b4bd377218fe088c1d65aa77dc16ae826d06a10ad1b1c5f38?d=identicon)[anujsinghwd](/maintainers/anujsinghwd)

---

Top Contributors

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

---

Tags

phprouting

### Embed Badge

![Health badge](/badges/anujsinghwd-anrouter/health.svg)

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

PHPackages © 2026

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