public function addElement($tag, array $attributes = [])
    {
        if ($tag instanceof self) {
            $htmlTag      = $tag;
            $htmlTag->top = $this->top;
            $htmlTag->attrs($attributes);
            $this->elements->add($htmlTag);

            return $htmlTag;
        }

        return self::make(
            $tag,
            $attributes,
            $this->hasParent() ? $this->parent : $this
        );
    }
public function addElement($tag, array $attributes = [])
    {
        if ($tag instanceof self) {
            $htmlTag      = $tag;
            $htmlTag->top = $this->top;
            $htmlTag->attrs($attributes);
            $this->elements->add($htmlTag);

            return $htmlTag;
        }

        return self::make(
            $tag,
            $attributes,
            $this->hasParent() ? $this->parent : $this
        );
    }
public function addElement ( $ tag , array $ attributes = [ ] ) { if ( $ tag instanceof self ) { $ htmlTag = $ tag ; $ htmlTag -> top = $ this -> top ; $ htmlTag -> attrs ( $ attributes ) ; $ this -> elements -> add ( $ htmlTag ) ; return $ htmlTag ; } return self :: make ( $ tag , $ attributes , $ this -> hasParent ( ) ? $ this -> parent : $ this ) ; }
Add element at an existing Markup

@param  Tag|string $tag
@param  array      $attributes

@return Tag
Add element at an existing Markup