protected function setRouteProperties(Route $route, array $data)
    {
        $methods = get_class_methods(Route::class);
        $methods = array_diff($methods, ["allows", "path"]);
        foreach($data as $method => $args) {
            if (in_array($method, $methods)) {
                $route->$method($args);
            }
        }
        return $route;
    }