PHP code example of fr3on / laravel-sage

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

    

fr3on / laravel-sage example snippets


use Fr3on\Sage\Middleware\SemanticCache;

class SupportAgent implements Agent, HasMiddleware
{
    public function middleware(): array
    {
        return [
            new SemanticCache(threshold: 0.92, ttl: 86400),
        ];
    }
}
bash
php artisan vendor:publish --tag="sage-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="sage-config"