src/Curl/Curl.php
public function put($url, $data = array(), $payload = false)
    {
        if (! empty($data)) {
            if ($payload === false) {
                $url .= '?'.http_build_query($data);
            } else {
                $this->preparePayload($data);
            }
        }

        $this->setOpt(CURLOPT_URL, $url);
        $this->setOpt(CURLOPT_CUSTOMREQUEST, 'PUT');
        $this->exec();
        return $this;
    }
public function put($url, $data = array(), $payload = false)
    {
        if (! empty($data)) {
            if ($payload === false) {
                $url .= '?'.http_build_query($data);
            } else {
                $this->preparePayload($data);
            }
        }

        $this->setOpt(CURLOPT_URL, $url);
        $this->setOpt(CURLOPT_CUSTOMREQUEST, 'PUT');
        $this->exec();
        return $this;
    }
public function put ( $ url , $ data = array ( ) , $ payload = false ) { if ( ! empty ( $ data ) ) { if ( $ payload === false ) { $ url .= '?' . http_build_query ( $ data ) ; } else { $ this -> preparePayload ( $ data ) ; } } $ this -> setOpt ( CURLOPT_URL , $ url ) ; $ this -> setOpt ( CURLOPT_CUSTOMREQUEST , 'PUT' ) ; $ this -> exec ( ) ; return $ this ; }
Make a put request with optional data.

The put request data can be either sent via payload or as get parameters of the string.

@param string $url The url to make the put request
@param array $data Optional data to pass to the $url
@param bool $payload Whether the data should be transmitted trough payload or as get parameters of the string
@return self
Make a put request with optional data .