PHPackages                             olive-cms/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. olive-cms/router

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

olive-cms/router
================

OliveCMS Router with host handle

1.0.1(7y ago)113MITPHPPHP &gt;=5.5

Since Aug 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/OliveCMS/Router)[ Packagist](https://packagist.org/packages/olive-cms/router)[ RSS](/packages/olive-cms-router/feed)WikiDiscussions master Synced 3d ago

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

Router
======

[](#router)

OliveCMS Router with host handle

Installation
------------

[](#installation)

Install the latest version with

```
$ composer require olive-cms/router

```

If you do not use Composer, you can download composered zip from [release Github page](https://github.com/OliveCMS/Router/releases/latest)

Basic Usage
-----------

[](#basic-usage)

```
require_once 'vendor/autoload.php';
use Olive\Router;

$router = new Router();
$router->addHost('https://arshen.ir/', 1);
$router->addHost('https://blog.arshen.ir/', 2);

// global route
$router->add('/api', function(){
  return 'api area!';
});

// host 1 (https://arshen.ir/) route
$router->add('/login', function(){
  return 'login area! only use in https://arshen.ir/';
}, [], 1);

// not found route
$router->addNotFound('not found');

// render address
echo $router->render('https://arshen.ir/login');
```

Documentation
-------------

[](#documentation)

- [Usage Instructions](doc/01-usage.md)

Requirements
------------

[](#requirements)

- PHP 5.5+.

License
-------

[](#license)

olive-cms/router is licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Every ~127 days

Total

2

Last Release

2692d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f681924e9d9a624e173f79c797fa6040b53db3dad1de4ac45efa23e56d83e82?d=identicon)[OliveCMS](/maintainers/OliveCMS)

---

Top Contributors

[![xtoolkit](https://avatars.githubusercontent.com/u/8210666?v=4)](https://github.com/xtoolkit "xtoolkit (2 commits)")

---

Tags

arshencomposereasy-routerolive-cmsphpphp-routerrouterrouterOliveCMSOlive

### Embed Badge

![Health badge](/badges/olive-cms-router/health.svg)

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

###  Alternatives

[bramus/router

A lightweight and simple object oriented PHP Router

1.1k458.8k49](/packages/bramus-router)[izniburak/laravel-auto-routes

Auto Route Generating (Auto-Discovery) Package for Laravel

23645.3k](/packages/izniburak-laravel-auto-routes)[proai/lumen-annotations

Route and event binding annotations for Laravel Lumen

1012.4k](/packages/proai-lumen-annotations)[miranj/craft-router

Use URL segments as filtering criteria on an entry query.

231.6k](/packages/miranj-craft-router)

PHPackages © 2026

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