src/RouteCollector.php
public function addRoute(
        string $name,
        array $methods,
        string $pattern,
        array $middlewares,
        array $handler,
        string $group = null
    ) {
        $this->routes[$name] = [
            'methods' => $methods,
            'pattern' => $pattern,
            'middlewares' => $middlewares,
            'handler' => $handler,
            'group' => $group
        ];
    }
public function addRoute(
        string $name,
        array $methods,
        string $pattern,
        array $middlewares,
        array $handler,
        string $group = null
    ) {
        $this->routes[$name] = [
            'methods' => $methods,
            'pattern' => $pattern,
            'middlewares' => $middlewares,
            'handler' => $handler,
            'group' => $group
        ];
    }
public function addRoute ( string $ name , array $ methods , string $ pattern , array $ middlewares , array $ handler , string $ group = null ) { $ this -> routes [ $ name ] = [ 'methods' => $ methods , 'pattern' => $ pattern , 'middlewares' => $ middlewares , 'handler' => $ handler , 'group' => $ group ] ; }
Add route to collection.

@param string $name
@param array $methods
@param string $pattern
@param array $middlewares
@param array $handler
@param string $group
Add route to collection .