流明路由组不适用于命名路由

When I define a route inside a group in Lumen framwork it's working well with a direct closure but not with a controller name ; I always get a not found exception.

//Working
$app->group(['prefix' => 'admin'], function () use ($app) {
    $app->get('users', function ()    {
        //...
    });
});

//Get 'Class ExampleController does not exist'
$app->group(['prefix' => 'admin'], function () use ($app) {
    $app->get('users', ['uses' => 'ExampleController@indexAction']);
});

Thanks in advance.

You can fix it by adding a namespace:

$app->group(['prefix' => 'admin', 'namespace' => 'App\Http\Controllers'], function () use ($app) {
    $app->get('users', 'ExampleController@indexAction');
});