PHPackages                             elemenx/lumen-advanced-route - 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. elemenx/lumen-advanced-route

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

elemenx/lumen-advanced-route
============================

Add Support For Nested Group &amp;&amp; Resource.

0.2.0(5y ago)29.5k1MITPHPPHP &gt;=7.3

Since Dec 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/elemenx/lumen-advanced-route)[ Packagist](https://packagist.org/packages/elemenx/lumen-advanced-route)[ RSS](/packages/elemenx-lumen-advanced-route/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Note
====

[](#note)

inspired by fremail/lumen-nested-route-groups, adding support for lumen resource route.

Changelog
=========

[](#changelog)

- **v.0.1.1** Remove Useless Code.
- **v.0.1.0** Add Support For Lumen 5.5 &amp;&amp; Resource.

How to install (steps)
----------------------

[](#how-to-install-steps)

### 1. Install using Composer

[](#1-install-using-composer)

```
composer require "elemenx/lumen-advanced-route:~0.1"

```

### 2. Required changes in bootstrap/app.php

[](#2-required-changes-in-bootstrapappphp)

Change initialization of Lumen Application class to initialization of Lumen Nested Route Groups Application class in bootstrap/app.php.

Before:

```
$app = new Laravel\Lumen\Application(
    realpath(__DIR__.'/../')
);

```

After:

```
$app = new ElemenX\AdvancedRoute\Application(
    realpath(__DIR__.'/../')
);

```

Any() and Match() and resource() methods
----------------------------------------

[](#any-and-match-and-resource-methods)

Do you like `any()` and `match()` methods on Laravel? I love them! That's why I added supporting them on Lumen. The syntax is the same as for [Laravel](https://laravel.com/docs/master/routing#basic-routing):

```
$app->match($methods, $uri, $action);

```

Where *$methods* - an array of methods. Example: `['get', 'post', 'delete']`. *$uri* and *$action* are the same as on other methods

```
$app->any($uri, $action);

```

Here are *$uri* and *$method* are the same as on other methods like `$app->get(...)` etc.

Example of using this lib
-------------------------

[](#example-of-using-this-lib)

This is an example of routes/web.php

```
$app->group(['middleware' => 'auth'], function () use ($app) {

    $app->get('test', function () {
        echo "Hello world!";
    });

    $app->resource('user', 'UserController', ['only' => ['show', 'store', 'destroy']]);

    /**
     * only admins
     */
    $app->group(['middleware' => 'admin'], function () use ($app) {

        $app->group(['prefix' => 'admin'], function () use ($app) {
            $app->get('/', 'AdminController@index');
        });

    });

    /**
     * $app->any and $app->match available from v1.1.0
     */
    $app->any('/', function () use ($app) {
        echo "Hey! I don't care it's POST, GET, PATCH or another method. I'll answer on any of them :)";
    });

    $app->match(['PATCH', 'PUT', 'DELETE'], '/old/', function () use ($app) {
        echo "This is an old part of our site without supporting REST. Please use only GET and POST here.";
    });

});

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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 ~191 days

Recently: every ~272 days

Total

7

Last Release

1931d ago

PHP version history (3 changes)0.1.0PHP &gt;=7.0

0.1.7PHP &gt;=7.2

0.2.0PHP &gt;=7.3

### Community

Maintainers

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

---

Top Contributors

[![branchzero](https://avatars.githubusercontent.com/u/7685609?v=4)](https://github.com/branchzero "branchzero (1 commits)")

---

Tags

lumenrouteMatchgroupanyelemenx

### Embed Badge

![Health badge](/badges/elemenx-lumen-advanced-route/health.svg)

```
[![Health](https://phpackages.com/badges/elemenx-lumen-advanced-route/health.svg)](https://phpackages.com/packages/elemenx-lumen-advanced-route)
```

###  Alternatives

[fremail/lumen-nested-route-groups

Extends a lumen application for using nested route groups. In addition to the groups it's possible to use any() and match() methods.

1511.0k](/packages/fremail-lumen-nested-route-groups)[albertcht/lumen-helpers

To support Laravel 's unsupported features in Lumen.

3031.3k1](/packages/albertcht-lumen-helpers)[rdehnhardt/lumen-maintenance-mode

Define application maintenance mode.

2526.3k1](/packages/rdehnhardt-lumen-maintenance-mode)[proai/lumen-annotations

Route and event binding annotations for Laravel Lumen

1012.4k](/packages/proai-lumen-annotations)

PHPackages © 2026

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