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

ActiveLibrary

baka/router
===========

A tool to create multiple Phalcon Collections with easy

0.1.1(6y ago)42.1k1[1 issues](https://github.com/bakaphp/router/issues)MITPHPPHP &gt;=7.1

Since Jun 19Pushed 6y ago3 watchersCompare

[ Source](https://github.com/bakaphp/router)[ Packagist](https://packagist.org/packages/baka/router)[ Docs](https://bakaphp.github.io/router)[ RSS](/packages/baka-router/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (0)

Baka Router
===========

[](#baka-router)

A tool to create multiple Phalcon [Collection](https://docs.phalconphp.com/3.4/en/api/Phalcon_Mvc_Micro_Collection)s with easy.

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

[](#requirements)

- This package requires PHP 7.1 or higher.
- Phalcon 3.4 or higher.

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

[](#installation)

You can install the package via composer:

```
composer require baka/router
```

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

[](#basic-usage)

```
require_once __DIR__ . '/vendor/autoload.php';

use Baka\Router\RouteGroup;
use Baka\Router\Route;
use Baka\Router\Utils\Http;

$routes = [
    Route::add('u')->controller('UsersController')->via(Http::GET, Http::POST),
    Route::get('custom-fields'),
    Route::put('users')->action('editUser'),
    Route::add('companies')->middlewares(
        'custom.middleware@before:10,12',
        'custom.middleware2@after'
    ),
];

$anotherRoute = new Route('companies');

$anotherRoute->prefix('/v2')
->controller('CompaniesController')
->namespace('App\\Api\\Controllers')
->via('get','put','post');

$routeGroup = RouteGroup::from($routes)
->addRoute(Route::put('products')->action('edit'))
->addRoute($anotherRoute)
->addMiddlewares('extra.middleware@before')
->defaultNamespace('App\\Default\\Controllers')
->defaultAction('call');

$collections = $routeGroup->toCollections();

var_dump($collections); // 16 Collection instances

// Mount collections to the app

$app = new \Phalcon\Mvc\Micro();

foreach ($collections as $collection){
    $app->mount($collection);
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.1% 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 ~156 days

Total

3

Last Release

2210d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/136c850ea7ec76b23cc5b1fed8507683cc891145cffedc7761fe73ce03960df3?d=identicon)[mctekk](/maintainers/mctekk)

---

Top Contributors

[![gabbanaesteban](https://avatars.githubusercontent.com/u/11374198?v=4)](https://github.com/gabbanaesteban "gabbanaesteban (69 commits)")[![kaioken](https://avatars.githubusercontent.com/u/118385?v=4)](https://github.com/kaioken "kaioken (13 commits)")[![DannyFeliz](https://avatars.githubusercontent.com/u/5460365?v=4)](https://github.com/DannyFeliz "DannyFeliz (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

routerphalconbakamctekk

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/routing

Maps an HTTP request to a set of configuration variables

7.6k789.4M1.8k](/packages/symfony-routing)[slim/slim

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs

12.2k49.9M1.3k](/packages/slim-slim)[nikic/fast-route

Fast request router for PHP

5.3k92.4M668](/packages/nikic-fast-route)[michele-angioni/phalcon-repositories

A library which simplifies the use of the Repository pattern in Phalcon.

2024.7k](/packages/michele-angioni-phalcon-repositories)[stanislav-web/phalcon-sms-factory

Multiple gateway SMS Sender factory. Provide any SMS services inside your Phalcon's projects

321.6k](/packages/stanislav-web-phalcon-sms-factory)

PHPackages © 2026

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