PHP code example of kkohoutek / cleverbot-laravel

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

    

kkohoutek / cleverbot-laravel example snippets


Route::get('/', function (Kkohoutek\Cleverbot\Cleverbot $cb) {

    $response = $cb->query('Hello Cleverbot!');  
    logger($response->output);
    
     // Keep passing ´cs´ to continue the same conversation
    $response = $cb->query('How are you doing?', $response->cs);  
    logger($response->output);
    
    // ... Return  ...
});