PHP code example of el-schneider / statamic-auto-alt-text

1. Go to this page and download the library: Download el-schneider/statamic-auto-alt-text 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/ */

    

el-schneider / statamic-auto-alt-text example snippets


use App\Prism\Providers\MyCustomProvider;

public function boot(): void
{
    $this->app['prism-manager']->extend('my-provider', function ($app, $config) {
        return new MyCustomProvider(apiKey: $config['api_key']);
    });
}

'ollama' => [
    'url' => env('OLLAMA_URL', 'http://localhost:11434'),
],
bash
php artisan vendor:publish --tag="statamic-auto-alt-text-config"
bash
php artisan vendor:publish --tag="prism-config"
bash
php please auto-alt:generate
bash
php artisan vendor:publish --tag="prism-config"