src/Query.php
public function set($field, $value = null)
    {
        if ($value === false) {
            throw new Exception([
                'Value "false" is not supported by SQL',
                'field' => $field,
                'value' => $value,
            ]);
        }

        if (is_array($value)) {
            throw new Exception([
                'Array values are not supported by SQL',
                'field' => $field,
                'value' => $value,
            ]);
        }

        if (is_array($field)) {
            foreach ($field as $key => $value) {
                $this->set($key, $value);
            }

            return $this;
        }

        if (is_string($field) || $field instanceof Expression || $field instanceof Expressionable) {
            $this->args['set'][] = [$field, $value];
        } else {
            throw new Exception([
                'Field name should be string or Expressionable',
                'field' => $field,
            ]);
        }

        return $this;
    }
public function set($field, $value = null)
    {
        if ($value === false) {
            throw new Exception([
                'Value "false" is not supported by SQL',
                'field' => $field,
                'value' => $value,
            ]);
        }

        if (is_array($value)) {
            throw new Exception([
                'Array values are not supported by SQL',
                'field' => $field,
                'value' => $value,
            ]);
        }

        if (is_array($field)) {
            foreach ($field as $key => $value) {
                $this->set($key, $value);
            }

            return $this;
        }

        if (is_string($field) || $field instanceof Expression || $field instanceof Expressionable) {
            $this->args['set'][] = [$field, $value];
        } else {
            throw new Exception([
                'Field name should be string or Expressionable',
                'field' => $field,
            ]);
        }

        return $this;
    }
Sets field value for INSERT or UPDATE statements.

@param string|array $field Name of the field
@param mixed        $value Value of the field

@return $this