public function generate(string $name, array $attributes = [], ?string $prefix = null): string
    {
        $prefix = $prefix ?? $this->prefix ?? "";

        $route = $this->routes->oneNamed($name);

        if ($route === null) {
            throw RouteNotFound::named($name);
        }

        $path = $route->getPath();

        $uri = $this->uriFactory->create($path, $attributes);

        return $prefix . $uri;
    }
public function generate(string $name, array $attributes = [], ?string $prefix = null): string
    {
        $prefix = $prefix ?? $this->prefix ?? "";

        $route = $this->routes->oneNamed($name);

        if ($route === null) {
            throw RouteNotFound::named($name);
        }

        $path = $route->getPath();

        $uri = $this->uriFactory->create($path, $attributes);

        return $prefix . $uri;
    }
public function generate ( string $ name , array $ attributes = [ ] , ? string $ prefix = null ) : string { $ prefix = $ prefix ?? $ this -> prefix ?? "" ; $ route = $ this -> routes -> oneNamed ( $ name ) ; if ( $ route === null ) { throw RouteNotFound :: named ( $ name ) ; } $ path = $ route -> getPath ( ) ; $ uri = $ this -> uriFactory -> create ( $ path , $ attributes ) ; return $ prefix . $ uri ; }
Generates the URI of route with given name filled with provided
attributes and with specified prefix.

@param string $name
@param array $attributes
@param null|string $prefix
@return string
@throws InvalidAttribute
@throws RouteNotFound
Generates the URI of route with given name filled with provided attributes and with specified prefix .