public function getUrlAttribute($value)
    {
        if ($this->hasChildren()) {
            return MenuItemContract::URL_EMPTY;
        }

        switch ($this->type) {
            case MenuItemContract::TYPE_ROUTE:
                return $this->routeGracefulOnError($this->target, $this->parameters);

            case MenuItemContract::TYPE_URL:
                return $this->target;

            default:
                return;
        }
    }
public function getUrlAttribute($value)
    {
        if ($this->hasChildren()) {
            return MenuItemContract::URL_EMPTY;
        }

        switch ($this->type) {
            case MenuItemContract::TYPE_ROUTE:
                return $this->routeGracefulOnError($this->target, $this->parameters);

            case MenuItemContract::TYPE_URL:
                return $this->target;

            default:
                return;
        }
    }
public function getUrlAttribute ( $ value ) { if ( $ this -> hasChildren ( ) ) { return MenuItemContract :: URL_EMPTY ; } switch ( $ this -> type ) { case MenuItemContract :: TYPE_ROUTE : return $ this -> routeGracefulOnError ( $ this -> target , $ this -> parameters ) ; case MenuItemContract :: TYPE_URL : return $ this -> target ; default : return ; } }
Builds the targeting url based upon the given
type if the current item.

@param $value

@return string
Builds the targeting url based upon the given type if the current item .