Download the PHP package vedanshi-shethia/ai-banner-generator without Composer

On this page you can find all versions of the php package vedanshi-shethia/ai-banner-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ai-banner-generator

๐ŸŽจ AI Banner Generator (Laravel Package)

A driver-based, extensible Laravel package for generating high-quality website banners using AI image models (Gemini, OpenAI, or custom providers).

This package abstracts AI image generation, prompt building, image handling, and storage, while allowing developers to plug in their own AI drivers without touching core logic.


โœจ Features


๐Ÿ“ฆ Installation

1๏ธโƒฃ Install via Composer


2๏ธโƒฃ Publish Configuration

This will create:


3๏ธโƒฃ Configure Storage

Ensure your output disk is publicly accessible.


๐Ÿ”‘ Environment variables


๐Ÿง  Storage Design (Important)

This package follows industry best practices:

Type Disk Visibility
Input images local ๐Ÿ”’ Private
Generated banners public ๐ŸŒ Public

โš™๏ธ Configuration (config/ai-banner-generator.php)

๐Ÿ“Œ Important


๐Ÿง  Architecture Overview

Key Components

Layer Responsibility
Service Business flow
Factory Driver resolution
Driver AI interaction
Helpers Image / prompt handling
Storage File persistence

๐Ÿงฉ Banner Generation Flow

  1. Input images are uploaded
  2. Images are loaded & converted to Base64
  3. Prompt is generated
  4. Driver is resolved
  5. AI generates banner
  6. Image is validated & stored
  7. Temporary files are cleaned
  8. Public URL is returned

๐Ÿš€ Usage

1๏ธโƒฃ Sync Generation (Facade)

Returns a public URL of the generated banner.


2๏ธโƒฃ Async Generation (Queue)

โœ… Ideal for:


๐Ÿงพ Expected Payload Structure

โš ๏ธ Do NOT pass temp paths (php/tmp). Files must be stored first using Laravel storage.


๐Ÿงน Automatic Cleanup


๐Ÿ–ผ๏ธ Image Handling & Safety

Before storing the generated image:

This prevents:


๐Ÿ”Œ Built-in Drivers

Gemini Driver

Uses Prism internally for image generation.


OpenAI Driver

Abstracted behind the same interface.


Null Driver

Useful for:


๐Ÿงฉ Creating a Custom Driver (User Extensible)

1๏ธโƒฃ Implement the Contract


2๏ธโƒฃ Register the Driver


3๏ธโƒฃ Add Key in .env

๐ŸŽ‰ Done โ€” no core code touched.


๐Ÿง  Why This Design Works

This is the same architecture Laravel uses for Cache, Queue, Mail, and Filesystems.


๐Ÿงช Testing

Use the null driver:

This avoids API calls and allows fast testing.


๐Ÿ“Œ Summary


๐Ÿ“„ License

MIT License


๐Ÿ™Œ Credits

Developed by Vedanshi Shethia


๐Ÿค Contributing

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



All versions of ai-banner-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
prism-php/prism Version ^0.99
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vedanshi-shethia/ai-banner-generator contains the following files

Loading the files please wait ...