Cloudinary\Api::delete_resources PHP Method

delete_resources() public method

public delete_resources ( $public_ids, $options = [] )
    function delete_resources($public_ids, $options = array())
    {
        $resource_type = \Cloudinary::option_get($options, "resource_type", "image");
        $type = \Cloudinary::option_get($options, "type", "upload");
        $uri = array("resources", $resource_type, $type);
        return $this->call_api("delete", $uri, array_merge(array("public_ids" => $public_ids), $this->only($options, array("keep_original", "invalidate", "transformation"))), $options);
    }

Usage Example

 public function delete($filename)
 {
     $file = new RootFile($filename);
     $public_id = str_replace('.' . $file->getExtension(), '', $filename);
     $api = new Cloudinary\Api();
     $response = $api->delete_resources($public_id);
     return true;
 }
All Usage Examples Of Cloudinary\Api::delete_resources