PHP code example of eristemena / botman-driver-dialogflow
1. Go to this page and download the library: Download eristemena/botman-driver-dialogflow 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/ */
eristemena / botman-driver-dialogflow example snippets
$botman->hears('Intent Name', function ($botman) {
// replies here
});
$botman->hears('Default Welcome Intent', function ($botman) {
$botman->reply('Hi, welcome!');
});
$text = Text::create()
->text('Hello')
->ssml('
<speak>
Hello!
<audio src="https://actions.google.com/sounds/v1/cartoon/clang_and_wobble.ogg"></audio>
</speak>
')
;
$botman->reply($text);