PHP code example of scott / laravel-gemini

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

    

scott / laravel-gemini example snippets


use Scott\LaravelGemini\GeminiAi;
$prompt = GeminiAi::models('gemini-pro')
    ->generateText('I am a web developer');

echo $prompt;
bash
php artisan vendor:publish --provider="Scott\LaravelGemini\LaravelGeminiServiceProvider" --tag="laravel-gemini-config"