public function fromRoute($name, array $params = [])
    {
        $router = $this->getRouter();
        $route  = $router->get($name);

        return $route->assemble($params);
    }
public function fromRoute($name, array $params = [])
    {
        $router = $this->getRouter();
        $route  = $router->get($name);

        return $route->assemble($params);
    }
public function fromRoute ( $ name , array $ params = [ ] ) { $ router = $ this -> getRouter ( ) ; $ route = $ router -> get ( $ name ) ; return $ route -> assemble ( $ params ) ; }
Gets url from route.

@param string $name   The route name
@param array  $params Optional; the route parameters

@return string The url
Gets url from route .