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 1mo ago

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 14% 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

886d 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/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

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

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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