public function getHrefAttribute()
    {
        if(Route::getRoutes()->getByName($this->routeName)) {
            if($this->params) {
                $params = self::setParams($this);
                $url = route($this->routeName, $params);
            }else{
                $url = route($this->routeName);
            }
            return $url;

        }else{
            throw new \Exception("No route found for '".$this->routeName."' MenuLink: ".$this->label);
        }
    }
public function getHrefAttribute()
    {
        if(Route::getRoutes()->getByName($this->routeName)) {
            if($this->params) {
                $params = self::setParams($this);
                $url = route($this->routeName, $params);
            }else{
                $url = route($this->routeName);
            }
            return $url;

        }else{
            throw new \Exception("No route found for '".$this->routeName."' MenuLink: ".$this->label);
        }
    }
public function getHrefAttribute ( ) { if ( Route :: getRoutes ( ) -> getByName ( $ this -> routeName ) ) { if ( $ this -> params ) { $ params = self :: setParams ( $ this ) ; $ url = route ( $ this -> routeName , $ params ) ; } else { $ url = route ( $ this -> routeName ) ; } return $ url ; } else { throw new \ Exception ( "No route found for '" . $ this -> routeName . "' MenuLink: " . $ this -> label ) ; } }
Generate the URL to a MenuLink.

@return string
@throws \Exception
Generate the URL to a MenuLink .