final protected function put($resource, $data)
    {
        // Initilize the request as put
        $this->init('put', $resource);

        // Is an object
        if (!is_array($data)) {
            $data = $this->fragment($data);
        }

        // Setting the fields to request
        $data = Stream::factory(json_encode($data));
        $body = $this->request->setBody($data);

        // Make the request using guzzle
        return $this->call();
    }
final protected function put($resource, $data)
    {
        // Initilize the request as put
        $this->init('put', $resource);

        // Is an object
        if (!is_array($data)) {
            $data = $this->fragment($data);
        }

        // Setting the fields to request
        $data = Stream::factory(json_encode($data));
        $body = $this->request->setBody($data);

        // Make the request using guzzle
        return $this->call();
    }
final protected function put ( $ resource , $ data ) { // Initilize the request as put $ this -> init ( 'put' , $ resource ) ; // Is an object if ( ! is_array ( $ data ) ) { $ data = $ this -> fragment ( $ data ) ; } // Setting the fields to request $ data = Stream :: factory ( json_encode ( $ data ) ) ; $ body = $ this -> request -> setBody ( $ data ) ; // Make the request using guzzle return $ this -> call ( ) ; }
Send PUT http request.

@param string $resource Resource to call eg. /users/1
@param mixed  $data     Fields to send using put paramters

@return Response of the request
Send PUT http request .