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