public function route($name, $parameters = [])
    {
        $route = router()->route($name);
        if (is_null($route)) {
            throw new \Exception("Route name [$name] not found");
        }

        $route_url = $route->url($parameters);

        return $this->to($route_url);
    }
public function route($name, $parameters = [])
    {
        $route = router()->route($name);
        if (is_null($route)) {
            throw new \Exception("Route name [$name] not found");
        }

        $route_url = $route->url($parameters);

        return $this->to($route_url);
    }
public function route ( $ name , $ parameters = [ ] ) { $ route = router ( ) -> route ( $ name ) ; if ( is_null ( $ route ) ) { throw new \ Exception ( "Route name [$name] not found" ) ; } $ route_url = $ route -> url ( $ parameters ) ; return $ this -> to ( $ route_url ) ; }
Generate an absolute URL to the route.

@param $name
@param array $parameters
@return string
@throws \Exception
Generate an absolute URL to the route .