public function setAttribute(string $attribute, $value = []): self
    {
        $this->attributes[$attribute] = $this->wrap($value);

        return $this;
    }
public function setAttribute(string $attribute, $value = []): self
    {
        $this->attributes[$attribute] = $this->wrap($value);

        return $this;
    }
public function setAttribute ( string $ attribute , $ value = [ ] ) : self { $ this -> attributes [ $ attribute ] = $ this -> wrap ( $ value ) ; return $ this ; }
Sets the value of an attribute. If the attribute is already set, it overwrites the current value.
@param string $attribute
@param array|string $value
@return $this
Sets the value of an attribute . If the attribute is already set it overwrites the current value .