PHP code example of hatem-elsheref / whatsapp-business
1. Go to this page and download the library: Download hatem-elsheref/whatsapp-business 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/ */
hatem-elsheref / whatsapp-business example snippets
use WhatsApp\Business\Services\ConversationService;
$service = app(ConversationService::class);
$message = $service->sendMessage(
$conversation,
'Hello, how can I help you?',
$agentId
);
use WhatsApp\Business\Services\FlowEngine;
$flowEngine = app(FlowEngine::class);
$flowEngine->startFlow($flow, $conversation);