<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kirschbaum-development / bee-plugin-php-client example snippets
$beeEditorData = []; // this will be the JSON generated using the editor
$html = $bee->html($beeEditorData);
$pdf = $bee->pdf([
'html' => $html, // HTML generated using the HTML API (pe', // (optional)
]);
// then, you can call these methods:
$pdf->getUrl();
$pdf->getFilename();
$pdf->getPageSize();
$pdf->getPageOrientation();
$pdf->getContentType();
$image = $bee->image([
'html' => $html, // HTML generated using the HTML API (pe' => 'jpg',
]);
// then, you can save the image content somewhere, some examples on how you may do this:
file_put_contents('/path/to/storage/image.jpg', $image);
// on Laravel with Storage object:
Storage::put('/path/to/storage/image.jpg', $image);
use KirschbaumDevelopment\Bee\BeeAuth;
$beeAuth = new BeeAuth(new \GuzzleHttp\Client);
$beeAuth->setClientId('your-client-id-here');
$beeAuth->setClientSecret('your-client-secret-here');
$token = $beeAuth->generateToken();
// then you can use the following methods:
$token->getAccessToken();
$token->getRefreshToken();
$token->getExpires();