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

ActiveLibrary[Framework](/categories/framework)

slip/router
===========

Enhanced Slim router with namespaces support

14PHP

Since Apr 20Pushed 7y agoCompare

[ Source](https://github.com/DarkWasabi/slip-router)[ Packagist](https://packagist.org/packages/slip/router)[ RSS](/packages/slip-router/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Slip Router
===========

[](#slip-router)

Slip Router allows you to add namespaces to your Slim routes and route groups.

Install
-------

[](#install)

Via Composer

```
$ composer require slip/router
```

Usage
-----

[](#usage)

You need to replace default Slim router with Slip router:

```
$app = new \Slim\App();
$container = $app->getContainer();

$container['router'] = function ($container) {
    $routerCacheFile = false;

    if (isset($container->get('settings')['routerCacheFile'])) {
        $routerCacheFile = $container->get('settings')['routerCacheFile'];
    }

    $router = (new \Slip\Routing\Router())->setCacheFile($routerCacheFile);

    $router->setContainer($container);

    return $router;
};
```

Then you can set your routes namespaces

```
$app->get('/profile/user/{id}', 'UserController:getProfile')->setNamespace('App\Http\Controllers');
```

Or you can add namespace to the whole route group

```
$app->group('/profile/user', function ($app) {
    $app->get('/{id}, 'UserController:getProfile');
})->setNamespace('App\Http\Controllers');
```

Nested route groups also support namespaces

```
$app->group('/profile', function ($app) {
    $app->group('/user', function ($app) {
        $app->get('/{id}, 'UserController:getProfile');
    })->setNamespace('Http\Controllers');
})->setNamespace('App');
```

Route namespace appends to route groups namespaces

```
$app->group('/profile', function ($app) {
    $app->group('/user', function ($app) {
        $app->get('/{id}, 'UserController:getProfile')->setNamespace('Controllers');
    })->setNamespace('Http');
})->setNamespace('App');
```

Testing
-------

[](#testing)

```
$ php ./vendor/bin/phpunit
```

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/83379dc468dd5c0a86305946b9e2fea66f44dee34f82a21b8ce8faa6c0541bd1?d=identicon)[dark-wasabi](/maintainers/dark-wasabi)

### Embed Badge

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

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/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.7M255](/packages/laravel-dusk)[laravel/prompts

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

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

A simple API extension for DateTime.

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

PHPackages © 2026

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