No
Because nikic fastroute doesn't support it. You have to specify each route.
How to group routes in Laravel Lumen framework.
.......... $app->group(array('prefix' => '/api'), function() use ($app)
.......... {
// Version group
.......... .......... $app->group(array('prefix' => '/v1'), function() use ($app){
.......... ..........$app->get('users/', function() use ($app) {
.......... ..........return 'hello';
.......... .......... });
.......... });
});
When searched {URL}/api/v1/users it returs page not found error, but works when searched for {URL}/users
Hola que tal amigos les comparto una solución rápida saludos!!! Con esto funciona perfecto para lo alias...
$app->group( ['namespace' => 'App\Http\Controllers'] , function($app)
{
// Variable Prefix
$api = 'api/';
$app->get( $api.'/', ['uses' => 'PaginaController@pagina1', 'as' => 'pagina1'] );
$app->get( $api.'/otro', ['uses' => 'PaginaController@pagina2', 'as' => 'pagina2'] );
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community