src/Payloads/RawPayload.php
public function add($key, $value)
    {
        if (! is_null($key)) {
            $currentValue = Arr::get($this->payload, $key, []);

            if (! is_array($currentValue)) {
                $currentValue = Arr::wrap($currentValue);
            }

            $currentValue[] = $value;

            Arr::set($this->payload, $key, $currentValue);
        }

        return $this;
    }
public function add($key, $value)
    {
        if (! is_null($key)) {
            $currentValue = Arr::get($this->payload, $key, []);

            if (! is_array($currentValue)) {
                $currentValue = Arr::wrap($currentValue);
            }

            $currentValue[] = $value;

            Arr::set($this->payload, $key, $currentValue);
        }

        return $this;
    }
public function add ( $ key , $ value ) { if ( ! is_null ( $ key ) ) { $ currentValue = Arr :: get ( $ this -> payload , $ key , [ ] ) ; if ( ! is_array ( $ currentValue ) ) { $ currentValue = Arr :: wrap ( $ currentValue ) ; } $ currentValue [ ] = $ value ; Arr :: set ( $ this -> payload , $ key , $ currentValue ) ; } return $ this ; }
Add a value.

@param string $key
@param mixed $value
@return $this
Add a value .