src/Group.php
public function setPrefix($prefix)
    {
        $prefix = "/" . ltrim($prefix, "/");
        $routes = [];
        foreach ($this->routes as $route)
            $routes[] = $route->setPattern(rtrim($prefix . $route->getPattern(), "/"));
        $this->routes = $routes;
        return $this;
    }
public function setPrefix($prefix)
    {
        $prefix = "/" . ltrim($prefix, "/");
        $routes = [];
        foreach ($this->routes as $route)
            $routes[] = $route->setPattern(rtrim($prefix . $route->getPattern(), "/"));
        $this->routes = $routes;
        return $this;
    }
public function setPrefix ( $ prefix ) { $ prefix = "/" . ltrim ( $ prefix , "/" ) ; $ routes = [ ] ; foreach ( $ this -> routes as $ route ) $ routes [ ] = $ route -> setPattern ( rtrim ( $ prefix . $ route -> getPattern ( ) , "/" ) ) ; $ this -> routes = $ routes ; return $ this ; }
Add a prefix to all grouped routes pattern.

@param string $prefix
@return self
Add a prefix to all grouped routes pattern .