public function addRoute(string $method, string $route, ...$callback)
    {
        $method = strtolower($method);
        $route = ltrim($route, '/');
        $group = rtrim($this->group, '/') . '/';
        $route = $group . $route;
        $scope = $this->middleware->count();
        $this->layer[$method][] = new Route(
            $method,
            $route,
            $callback,
            $scope,
            $this->group
        );

        return true;
    }
public function addRoute(string $method, string $route, ...$callback)
    {
        $method = strtolower($method);
        $route = ltrim($route, '/');
        $group = rtrim($this->group, '/') . '/';
        $route = $group . $route;
        $scope = $this->middleware->count();
        $this->layer[$method][] = new Route(
            $method,
            $route,
            $callback,
            $scope,
            $this->group
        );

        return true;
    }
public function addRoute ( string $ method , string $ route , ... $ callback ) { $ method = strtolower ( $ method ) ; $ route = ltrim ( $ route , '/' ) ; $ group = rtrim ( $ this -> group , '/' ) . '/' ; $ route = $ group . $ route ; $ scope = $ this -> middleware -> count ( ) ; $ this -> layer [ $ method ] [ ] = new Route ( $ method , $ route , $ callback , $ scope , $ this -> group ) ; return true ; }
add a route to stack

@param string $method
@param string $route
@param array $callback
@return bool
add a route to stack