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

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

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

A tool to create multiple Phalcon Collections with easy

0.1.1(6y ago)42.2k1[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 2w 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 47% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity24

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

2257d 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

[phalcon/zephir

Zephir is a compiled high level language aimed to the creation of C-extensions for PHP

3.4k435.9k19](/packages/phalcon-zephir)[bramus/router

A lightweight and simple object oriented PHP Router

1.1k478.8k53](/packages/bramus-router)[phalcon/ide-stubs

The most complete Phalcon Framework IDE stubs library which enables autocompletion in modern IDEs.

1643.2M128](/packages/phalcon-ide-stubs)[izniburak/laravel-auto-routes

Auto Route Generating (Auto-Discovery) Package for Laravel

23548.1k](/packages/izniburak-laravel-auto-routes)[phalcongelist/php-diff

A comprehensive library for generating differences between two hashable objects (strings or arrays).

12435.6k2](/packages/phalcongelist-php-diff)[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)
