PHPackages                             vedanshi-shethia/gemini-banner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vedanshi-shethia/gemini-banner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vedanshi-shethia/gemini-banner
==============================

Laravel package to generate website banners using Gemini AI

v1.0.1(6mo ago)01MITPHPPHP ^8.1

Since Dec 23Pushed 6mo agoCompare

[ Source](https://github.com/vedanshi-shethia/gemini-banner)[ Packagist](https://packagist.org/packages/vedanshi-shethia/gemini-banner)[ RSS](/packages/vedanshi-shethia-gemini-banner/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

---

Gemini Banner Generator for Laravel
===================================

[](#gemini-banner-generator-for-laravel)

A **Laravel package** to generate high-quality **website advertisement banners** using **Google Gemini Image API**, designed specifically for **book stores and publishers**.

This package strictly preserves **original book cover text, typography, and layout** by enforcing **copy-paste image usage** instead of AI text recreation.

---

✨ Features
----------

[](#-features)

- 🎨 AI-generated website banners using **Google Gemini**
- 🔒 **Private input images**, 🌍 **public generated banners**
- ❌ Zero text distortion or hallucination
- 📐 Aspect-ratio locking via reference image
- ⚡ **Sync &amp; Async (Queue) support**
- 🧱 Clean **service-based architecture**
- 🪄 Facade for simple usage
- 🧪 Queue-safe &amp; retry-safe
- ⚙️ Fully configurable storage paths &amp; disks
- 📦 Laravel auto-discovery support

---

📦 Installation
--------------

[](#-installation)

### Via Composer

[](#via-composer)

```
composer require vedanshi-shethia/gemini-banner
```

---

⚙️ Configuration
----------------

[](#️-configuration)

Publish the config file:

```
php artisan vendor:publish --tag=gemini-banner
```

This creates:

```
config/gemini-banner.php

```

---

🔗 Storage Symlink (Required)
----------------------------

[](#-storage-symlink-required)

This package stores generated banners on the public disk. Make sure the public storage symlink exists:

```
php php artisan storage:link
```

This creates:

```
public/storage → storage/app/public

```

### 🔑 Environment variables

[](#-environment-variables)

```
GEMINI_API_KEY=your_google_gemini_api_key

# Storage
GEMINI_INPUT_DISK=local
GEMINI_OUTPUT_DISK=public
```

---

🧠 Storage Design (Important)
----------------------------

[](#-storage-design-important)

This package follows **industry best practices**:

TypeDiskVisibilityInput images`local`🔒 PrivateGenerated banners`public`🌍 Public```
storage/
├── app/
│   ├── private/
│   │   └── gemini/input/
│   └── public/
│       └── gemini/output/

```

---

⚙️ Config Reference
-------------------

[](#️-config-reference)

```
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,
    ],
];
```

---

🚀 Usage
-------

[](#-usage)

### 1️⃣ Sync Generation (Facade)

[](#1️⃣-sync-generation-facade)

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

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

Returns a **public URL** of the generated banner.

---

### 2️⃣ Async Generation (Queue)

[](#2️⃣-async-generation-queue)

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

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

✅ Ideal for:

- Heavy image processing
- High-traffic systems
- Background workflows

---

🧾 Expected Payload Structure
----------------------------

[](#-expected-payload-structure)

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

> ⚠️ Do NOT pass temp paths (`php/tmp`). Files must be stored first using Laravel storage.

---

🧹 Automatic Cleanup
-------------------

[](#-automatic-cleanup)

- Input images are **deleted immediately after successful generation**
- Cleanup is **retry-safe**
- Cleanup can be disabled via config

```
'cleanup' => [
    'enabled' => false,
],
```

---

🧱 Architecture Overview
-----------------------

[](#-architecture-overview)

```
Request / Job
   ↓
GenerateBannerRequest
   ↓
GeminiBannerService
   ↓
Gemini API
   ↓
Public Storage (output)

```

- No controllers are published
- No routes are forced
- You stay in control of your application flow

---

📄 Requirements
--------------

[](#-requirements)

- PHP **8.1+**
- Laravel **9.x / 10.x / 11.x / 12.x**
- Google Gemini API access

---

📜 License
---------

[](#-license)

MIT License

---

🙌 Credits
---------

[](#-credits)

Developed by **Vedanshi Shethia**Powered by **Google Gemini AI**

---

🤝 Contributing
--------------

[](#-contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss improvements.

---

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance67

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

193d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/195996636?v=4)[vedanshi-shethia](/maintainers/vedanshi-shethia)[@vedanshi-shethia](https://github.com/vedanshi-shethia)

---

Top Contributors

[![vedanshi-shethia](https://avatars.githubusercontent.com/u/195996636?v=4)](https://github.com/vedanshi-shethia "vedanshi-shethia (10 commits)")

### Embed Badge

![Health badge](/badges/vedanshi-shethia-gemini-banner/health.svg)

```
[![Health](https://phpackages.com/badges/vedanshi-shethia-gemini-banner/health.svg)](https://phpackages.com/packages/vedanshi-shethia-gemini-banner)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
