public function attribute($attr, $value = '')
    {
        if (is_array($attr)) {
            foreach ($attr as $key => $value) {
                $this->attribute($key, $value);
            }
        } else {
            $this->attributes[$attr] = $value;
        }

        return $this;
    }
public function attribute($attr, $value = '')
    {
        if (is_array($attr)) {
            foreach ($attr as $key => $value) {
                $this->attribute($key, $value);
            }
        } else {
            $this->attributes[$attr] = $value;
        }

        return $this;
    }
public function attribute ( $ attr , $ value = '' ) { if ( is_array ( $ attr ) ) { foreach ( $ attr as $ key => $ value ) { $ this -> attribute ( $ key , $ value ) ; } } else { $ this -> attributes [ $ attr ] = $ value ; } return $ this ; }
Add form attributes.

@param string|array $attr
@param string       $value

@return $this
Add form attributes .