nhance/app/Controllers/Chatbot/BotService.php
2025-02-01 10:29:43 +05:30

110 lines
3.0 KiB
PHP

<?php
namespace App\Controllers\Chatbot;
use BotMan\BotMan\BotMan;
class BotService
{
public static function sendMainOptions(BotMan $bot)
{
$bot->reply('Welcome! Please choose an option:', [
'reply_markup' => json_encode([
'keyboard' => [
['Card Download'],
['Network Hospital'],
['Reimbursement Claim Process'],
['Reimbursement Claim Status'],
['New Policy'],
['Renew Policy']
],
'resize_keyboard' => true,
'one_time_keyboard' => true
])
]);
}
public static function handleCardDownload(BotMan $bot)
{
$bot->reply('Please choose an option:', [
'reply_markup' => json_encode([
'keyboard' => [
['Download Card'],
['Go Back']
],
'resize_keyboard' => true,
'one_time_keyboard' => true
])
]);
}
public static function handleNetworkHospital(BotMan $bot)
{
$bot->reply('Please choose an option:', [
'reply_markup' => json_encode([
'keyboard' => [
['Find Hospital'],
['Go Back']
],
'resize_keyboard' => true,
'one_time_keyboard' => true
])
]);
}
public static function handleReimbursementClaimProcess(BotMan $bot)
{
$bot->reply('Please choose an option:', [
'reply_markup' => json_encode([
'keyboard' => [
['Submit Claim'],
['Go Back']
],
'resize_keyboard' => true,
'one_time_keyboard' => true
])
]);
}
public static function handleReimbursementClaimStatus(BotMan $bot)
{
$bot->reply('Please choose an option:', [
'reply_markup' => json_encode([
'keyboard' => [
['Check Status'],
['Go Back']
],
'resize_keyboard' => true,
'one_time_keyboard' => true
])
]);
}
public static function handleNewPolicy(BotMan $bot)
{
$bot->reply('Please choose an option:', [
'reply_markup' => json_encode([
'keyboard' => [
['Get Quote'],
['Go Back']
],
'resize_keyboard' => true,
'one_time_keyboard' => true
])
]);
}
public static function handleRenewPolicy(BotMan $bot)
{
$bot->reply('Please choose an option:', [
'reply_markup' => json_encode([
'keyboard' => [
['Renew Now'],
['Go Back']
],
'resize_keyboard' => true,
'one_time_keyboard' => true
])
]);
}
}