Download the PHP package naturalgroove/laravel-filament-image-generator-field without Composer

On this page you can find all versions of the php package naturalgroove/laravel-filament-image-generator-field. 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 laravel-filament-image-generator-field

Image Generator Form Field for Laravel Filament

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This custom field allows you to generate images with different sizes and formats using AI models like OpenAI DALL-E. It extends the FileUpload field and adds a button to open the image generator modal where you can set the sizes and formats of the generated images.

filament image generator ai

Installation

Before you begin, you must have the Laravel Filament package installed and configured. If you haven't done this yet, you can find the installation instructions here.

Prerequisites

Default Image Generator is set to OpenAI DALL-E (version 3). You should have an API key to use it. You can get it here. After You get the API key, you should set it in your .env file:

Install the package via composer

Run the following command in your terminal to install the package:

You can publish the config file with:

Configuration file lets you set the default image generator and the available image generators for the field.

Optionally, you can publish the views to customize the field:

Usage

screenshot

Just add new Field or replace your FileUpload field with ImageGenerator field in your form schema definition:

If You are replacing the FileUpload field:

You could use all the same options as FileUpload field, for example:

This plugin comes with a default image generator set to OpenAI DALL-E. You can select which version of the model you want to use when defining the field:

There are predefined shortcuts for the image generators:

Depending on the image generator you choose, there are different options you can set. For example Dall-E 2 allows to set the number of images generated.

After you add the field to your form, you should see a button next to the file input. When you click the button, the image generator modal will open.

screenshot

Adding custom image generators

You can add custom image generators by impolemeting the NaturalGroove\Filament\ImageGeneratorField\Contracts\AIImageGenerator interface. Your class should have the all the methods from the interface and should be registered in the config file. Format of returned array should be the same as in the example below:

screenshot

Upcoming features

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-filament-image-generator-field with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/forms Version ^3.0
guzzlehttp/guzzle Version ^7.8
openai-php/client Version ^0.8.5
spatie/laravel-package-tools Version ^1.15.0
symfony/http-client Version ^6.4
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 naturalgroove/laravel-filament-image-generator-field contains the following files

Loading the files please wait ....