PHP code example of madebybob / carbone-sdk

1. Go to this page and download the library: Download madebybob/carbone-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

madebybob / carbone-sdk example snippets


use MadeByBob\Carbone\Carbone;

$carbone = new Carbone('YOUR_API_KEY');

$response = $carbone->templates()->upload($content);

$templateId = $response->getTemplateId();

$response = $carbone->templates()->delete($templateId);

$response = $carbone->renders()->render($templateId, $data);

$renderId = $response->getRenderId();

$response = $carbone->renders()->download($renderId);

// Save the contents of the file yourself on your filesystem
$content = $response->getContent();