src/Attributes.php
public function attribute(string $name, string $value = null) : object
    {
        $this->attributes[$name] = $value;
        return $this;
    }
public function attribute(string $name, string $value = null) : object
    {
        $this->attributes[$name] = $value;
        return $this;
    }
public function attribute ( string $ name , string $ value = null ) : object { $ this -> attributes [ $ name ] = $ value ; return $ this ; }
Set an attribute with optional value.

@param string $name
@param string|null $value
@return object Self.
Set an attribute with optional value .