group() public method

Create a new route group.
public group ( array $attributes, callable $callback ) : void
$attributes array
$callback callable
return void
 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function map(Router $router, ApiRouter $apiRouter)
 {
     $apiRouter->version($this->version, function ($apiRouter) use($router) {
         $apiRouter->group(['namespace' => $this->namespace], function ($api) use($router) {
             $router->group(['namespace' => $this->namespace], function ($router) use($api) {
                 require app_path('Http/routes.php');
             });
         });
     });
 }