header('X-Api-Version'); $routeFile = $apiVersion ? base_path(sprintf('routes/%s.%s.php', $type, $apiVersion)) : null; if ($routeFile && file_exists($routeFile)) { Route::group([], $routeFile); } } }