Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PetroGromovo's avatar

How to make lumen routes support group routes with resource?

If lumen 8 has possibility to create group routes with resource support, like


$router->put('items/{id}/unpublish', 'ItemController@unpublish');

$router->group(['prefix' => 'items'], function ($router) {
    $router->resource('/{item_id}/item_categories', ItemCategoryController::class);
    ...
}); // Route::group(['prefix' => 'items'], function ($router) {

Maybe with some lumen extensions?

Thanks!

0 likes
5 replies
bugsysha's avatar

Considering all the recent changes, Lumen is not a smart option anymore. Maybe consider switching to Laravel.

PetroGromovo's avatar

Could you please detalise your answer? What is it based on ?

bugsysha's avatar

Based on Laravel Octane where the only advantage of Lumen was eliminated. What separated Lumen from Laravel was that Lumen had a simpler and lighter boot process. Now that Octane was introduced, Laravel is booted only once and that removes the only advantage Luman had over Laravel.

1 like
bugsysha's avatar

Do you mean https://laravel.com/docs/8.x/octane ?

Yes, that is what I was talking about.

Is it installed in lumen 8 app bu default? In composer.json of my lumen 8 app I did not find any octane referenced...

It is not available for Lumen and probably never will be.

Please or to participate in this conversation.