PHPackages                             sinevia/php-library-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sinevia/php-library-router

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sinevia/php-library-router
==========================

PHP Library Router

v1.3.0(7y ago)040proprietaryPHP

Since Jul 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Sinevia/php-library-router)[ Packagist](https://packagist.org/packages/sinevia/php-library-router)[ Docs](http://github.com/sinevia/php-library-router)[ RSS](/packages/sinevia-php-library-router/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Php Library Router
==================

[](#php-library-router)

A flexible router with multiple options

Introduction
------------

[](#introduction)

Unlike other routes, this router supports also database driven routes

Features
--------

[](#features)

- Retrieve routes from database, or specify programatically
- Parametrized routes
- Middleware

Installation (est. 1 min)
-------------------------

[](#installation-est-1-min)

```
composer require sinevia/php-library-router
```

Word of warning. Do use a stable package, as "dev-master" is a work in progress.

Create the database table:

```
$router = (new Plugins/Router);
$router->setDatabase($db);
$router->install();
```

Alternatively create the table manually with the following structure (default table name is snv\_actions\_action):

Id - integer Status - string / enum (Active|Inactive) ActionName - string Middleware - string Response - string Memo - text CreatedAt - datetime UpdatedAt - datetime DeletedAt - datetime

Uninstall (est. 1 min)
----------------------

[](#uninstall-est-1-min)

Removal of the package is a breeze:

```
composer require sinevia/php-library-router
```

Optionally, delete the route tables (the default table is snv\_actions\_action)

Configuration
-------------

[](#configuration)

$db = new Sinevia\\SqlDb(your\_database\_options); die((new Plugins\\Router())-&gt;setDatabase($db)-&gt;run()));

Example Routes
--------------

[](#example-routes)

IdStatusActionNameMiddlewareResponseMemo1Active/homewill excute the function home()2Inactive/hello/:stringverifyUser,setLastLoginhellowill excute the middleware functions verifyUser then setLastLogin then call the function hello($name)3Active/adminApp\\Admin@dashboardwill excute the method dashboard from class Admin in namespace AppHuman Friendly Action Names
---------------------------

[](#human-friendly-action-names)

The following shortcuts can be used to create human friendly routes (actions):

ShortcutRegex:any(\[^/\]+):num(\[0-9\]+):all(.\*):string(\[a-zA-Z\]+):number(\[0-9\]+):numeric(\[0-9-.\]+):alpha'(\[a-zA-Z0-9-\_\]+)Example action name: /article/:num/:string

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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

Every ~51 days

Total

4

Last Release

2742d ago

### Community

Maintainers

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

---

Top Contributors

[![Sinevia](https://avatars.githubusercontent.com/u/3450815?v=4)](https://github.com/Sinevia "Sinevia (23 commits)")

---

Tags

phprouterlibrarysinevia

### Embed Badge

![Health badge](/badges/sinevia-php-library-router/health.svg)

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

PHPackages © 2026

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