public function version($version, $second, $third = null)
{
if (func_num_args() == 2) {
list($version, $callback, $attributes) = array_merge(func_get_args(), [[]]);
} else {
list($version, $attributes, $callback) = func_get_args();
}
$attributes = array_merge($attributes, ['version' => $version]);
$this->group($attributes, $callback);
}
/** * Bootstrap any application services. * * @param Router $api */ public function boot(Router $api) { $path = app_path('Api/routes.php'); $api->version('v1', ['namespace' => $this->namespace], function ($api) use($path) { require $path; }); }