vlauciani's avatar

[Lumen] - Route Prefixes. Is there a bug in the documentations?

Hi all

Looking the Route Prefixes here: http://lumen.laravel.com/docs/routing#route-group-prefixes

the "app" variable is Undefined into:

    $app->get('users', function ()  {
        // Matches The "/admin/users" URL
    });

Is this correct?

Thank you.

0 likes
1 reply
lowrider's avatar

@vlauciani it works as described in documentation when used inside prefix group function:

$app->group(['prefix' => 'admin'], function ($app) {
    $app->get('users', function ()  {
        // Matches The "/admin/users" URL
    });
});

Please or to participate in this conversation.