public function add($methods, string $uri, $target): Route
    {
        // Create new Route instance
        $route = new Route($methods, $uri, $target, $this->config);

        // Index the route
        $this->indexRoute($route);

        return $route;
    }
public function add($methods, string $uri, $target): Route
    {
        // Create new Route instance
        $route = new Route($methods, $uri, $target, $this->config);

        // Index the route
        $this->indexRoute($route);

        return $route;
    }
public function add ( $ methods , string $ uri , $ target ) : Route { // Create new Route instance $ route = new Route ( $ methods , $ uri , $ target , $ this -> config ) ; // Index the route $ this -> indexRoute ( $ route ) ; return $ route ; }
Add a route

@param array $methods
@param string $uri
@param string|callable $target
@return Route
Add a route