PHP code example of aanfarhan / laravel-chatbot
1. Go to this page and download the library: Download aanfarhan/laravel-chatbot 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/ */
aanfarhan / laravel-chatbot example snippets
use Aanfarhan\Chatbot\Facades\Chatbot;
Route::get('/orders/{order}', function (Order $order) {
Chatbot::context(['order' => new OrderResource($order)]);
return view('orders.show', compact('order'));
})->name('orders.show');