PHP code example of erikaheidi / gdaisy

1. Go to this page and download the library: Download erikaheidi/gdaisy 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/ */

    

erikaheidi / gdaisy example snippets




use GDaisy\Template;
use GDaisy\Placeholder\ImagePlaceholder;

'width' => 150,
    'height' => 150,
]);
$image = new ImagePlaceholder([
    'width' => 150,
    'height' => 150,
]);
$template->addPlaceholder('thumb', $image);

//Applying Template
$template->apply("thumb", [
    "image_file" => __DIR__ . '/resources/images/gdaisy.png'
]);

$template->write('output.png');
echo "Finished.\n";



use GDaisy\Template;

e(__DIR__ . '/resources/templates/basic.json');

$template->apply("thumbnail", [
    "image_file" => __DIR__ . '/resources/images/gdaisy.png'
])->apply("title", [
    "text" => "generated with gdaisy"
]);

$template->write('output.png');
echo "Finished.\n";
shell
./vendor/bin/gdaisy generate cover https://www.digitalocean.com/community/tutorials/how-to-set-up-visual-studio-code-for-php-projects output.png