PHP code example of evgeny-korovin / laravel-query-logger

1. Go to this page and download the library: Download evgeny-korovin/laravel-query-logger 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/ */

    

evgeny-korovin / laravel-query-logger example snippets


'ai' => [
    'provider' => env('QUERY_LOGGER_AI_PROVIDER', 'opencode'),
    'model' => env('QUERY_LOGGER_AI_MODEL'),
    'providers' => [
        'opencode' => [
            'url' => env('OPENCODE_API_URL', 'https://opencode.ai/zen/v1/chat/completions'),
            'key' => env('OPENCODE_API_KEY'),
            'model' => env('OPENCODE_MODEL', 'big-pickle'),
            'headers' => [],
        ],
        'openai' => [
            'url' => env('OPENAI_API_URL', 'https://api.openai.com/v1/chat/completions'),
            'key' => env('OPENAI_API_KEY'),
            'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),
            'headers' => [],
        ],
    ],
],
bash
php artisan migrate
bash
php artisan vendor:publish --tag=query-logger-config