PHP code example of fahimhossain / laravel-ai-tryon

1. Go to this page and download the library: Download fahimhossain/laravel-ai-tryon 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/ */

    

fahimhossain / laravel-ai-tryon example snippets


'provider' => env('AI_TRYON_PROVIDER', 'gemini'),

'providers' => [
    'gemini' => [
        'api_key' => env('GEMINI_API_KEY'),
        'model' => env('GEMINI_IMAGE_MODEL', 'gemini-2.5-flash-image'),
        'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),
    ],
],

FahimHossain\LaravelAiTryon\Contracts\AiTryOnProviderInterface::class

'limits' => [
    'free_generations_per_user' => 5,
    'free_generations_per_ip' => 3,
    'daily_generations_per_user' => 20,
],

'queue' => [
    'enabled' => true,
    'connection' => env('AI_TRYON_QUEUE_CONNECTION', env('QUEUE_CONNECTION', 'database')),
],

'privacy' => [
    'store_user_uploads' => false,
    'auto_delete_uploads' => true,
    '
bash
php artisan vendor:publish --tag=ai-tryon-config
php artisan vendor:publish --tag=ai-tryon-assets
php artisan vendor:publish --tag=ai-tryon-migrations
bash
php artisan ai-tryon:install
php artisan migrate
bash
php artisan queue:table
php artisan migrate
php artisan queue:work