1. Go to this page and download the library: Download open-southeners/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/ */
$response = app('carbone')->template()->base64Upload($templateBase64);
if ($response->failed()) {
throw new \Exception('Template upload failed!');
}
// This is extracted from official Carbone SDK: https://carbone.io/api-reference.html#upload-a-template-carbone-cloud-sdk-php
$templateId = $response->getTemplateId();
$carbone = new Carbone('your-carbone-api-key');
// Use this if you want to use a different API version: https://carbone.io/api-reference.html#api-version
// $carbone = new Carbone('your-carbone-api-key', '4');
$templateBase64 = base64_encode(file_get_contents('path_to_your_template_here'));
$response = $carbone->template()->base64Upload($templateBase64);
if ($response->failed()) {
throw new \Exception('Template upload failed!');
}
// This is extracted from official Carbone SDK: https://carbone.io/api-reference.html#upload-a-template-carbone-cloud-sdk-php
$templateId = $response->getTemplateId();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.