PHP code example of vedanshi-shethia / gemini-banner

1. Go to this page and download the library: Download vedanshi-shethia/gemini-banner 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/ */

    

vedanshi-shethia / gemini-banner example snippets


return [

    'api_key' => env('GEMINI_API_KEY'),

    'endpoint' => 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent',

    'disks' => [
        'input'  => env('GEMINI_INPUT_DISK', 'local'),
        'output' => env('GEMINI_OUTPUT_DISK', 'public'),
    ],

    'paths' => [
        'front'     => 'gemini/input/front',
        'back'      => 'gemini/input/back',
        'reference' => 'gemini/input/reference',
        'output'    => 'gemini/output',
    ],

    'cleanup' => [
        'enabled' => true,
    ],
];

use Vedanshi\GeminiBanner\Facades\GeminiBanner;
use Vedanshi\GeminiBanner\Http\Requests\GenerateBannerRequest;

function (GenerateBannerRequest $request) {
    $result = GeminiBanner::generate($request->payload());
}

use Vedanshi\GeminiBanner\Jobs\GenerateGeminiBannerJob;
use Vedanshi\GeminiBanner\Http\Requests\GenerateBannerRequest;

function (GenerateBannerRequest $request) {
    GenerateGeminiBannerJob::dispatch($request->payload());
}


[
    'front_image' => string,        // path on input disk
    'back_image' => string,         // path on input disk
    'transparent_image' => string,  // path on input disk
    'product_name' => string,
]

'cleanup' => [
    'enabled' => false,
],
bash
php artisan vendor:publish --tag=gemini-banner

config/gemini-banner.php
bash
php php artisan storage:link