Lavary\Menu\Item::url PHP Method

url() public method

Generate URL for link
public url ( ) : string
return string
    public function url()
    {
        // If the item has a link proceed:
        if (!is_null($this->link)) {
            // If item's link has `href` property explcitly defined
            // return it
            if ($this->link->href) {
                return $this->link->href;
            }
            // Otherwise dispatch to the proper address
            return $this->builder->dispatch($this->link->path);
        }
    }