PHPackages                             meremammal/mere-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. [Framework](/categories/framework)
4. /
5. meremammal/mere-router

ActiveLibrary[Framework](/categories/framework)

meremammal/mere-router
======================

A basic router for PHP website

v1.0.0(2y ago)05PHP

Since Dec 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/meremammal/mere-router)[ Packagist](https://packagist.org/packages/meremammal/mere-router)[ RSS](/packages/meremammal-mere-router/feed)WikiDiscussions master Synced yesterday

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

MereRouter
==========

[](#mererouter)

This is primarily for my own personal use. It works well for my projects where I have a PHP file for each page that needs to be included depending on the url. A htaccess rewrite rule must be defined for this to work.

Include in your project using Composer:

```
"require": {
    "fletcherjohns/mere-router": "v1.0.0"
}

```

To register your endpoints, call static function `registerRoutes($routes)` passing an array in the following format.

```
TestMereRouter::registerRoutes([

    'path-segment' => [

        MereRouter::GET => [
            MereRouter::PAGE => 'filename.php',
            MereRouter::METHOD => function() {
                ...
            },
            MereRouter::PRIVILEGE => MEMBER,
            MereRouter::REDIRECT => 'home',
            MereRouter::ROUTES => [
                ...
            ]
        ],

        MereRouter::POST => [
            ...
        ]
    ],

    'other-segment' => [
        ...
    ]
]);

```

Then at appropriate point in your code, call static function `processRequest()` which will select appropriate route, and depending on privilege level, run associated method and return page filename. If path segment is not found, or privilege not satisfied, a redirect will occur.

Only registered path segments and request methods will be processed, otherwise a redirect will occur.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

937d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a1c599b58e87c743abf6053c0f07e00e7bccbf26bbee7361e1391f17e2f1ad1?d=identicon)[meremammal](/maintainers/meremammal)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/meremammal-mere-router/health.svg)

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M298](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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