applyRoutesPrefix($config); } private function applyRoutesPrefix(array $config): array { $routes =& $config['routes'] ?? []; // Prepend the routes prefix to every path foreach ($routes as $key => $route) { ['path' => $path] = $route; $routes[$key]['path'] = sprintf('%s%s', self::ROUTES_PREFIX, $path); } return $config; } }