public function setItemAttribute(string $attribute, string $value = '')
    {
        $this->applyToAll(function (HasHtmlAttributes $link) use ($attribute, $value) {
            $link->setAttribute($attribute, $value);
        });

        return $this;
    }
public function setItemAttribute(string $attribute, string $value = '')
    {
        $this->applyToAll(function (HasHtmlAttributes $link) use ($attribute, $value) {
            $link->setAttribute($attribute, $value);
        });

        return $this;
    }
public function setItemAttribute ( string $ attribute , string $ value = '' ) { $ this -> applyToAll ( function ( HasHtmlAttributes $ link ) use ( $ attribute , $ value ) { $ link -> setAttribute ( $ attribute , $ value ) ; } ) ; return $ this ; }
Set an attribute on all items in the menu.

@param string $attribute
@param string $value

@return $this
Set an attribute on all items in the menu .