'Botman integration in Laravel 8

I m going to set up a Laravel BotMan library inside my project. https://botman.io/2.0/welcome

I do not want to write everything in BotManController.php. I want to set up a proper structure. Could you please suggest a better structure for this?

class BotManController extends Controller
{
    public function handle()
    {
        $webConfig = config('botman.config');

        DriverManager::loadDriver(WebDriver::class);

        $botman = BotManFactory::create($webConfig);
        $botman->hears('hio', function (BotMan $bot) {
            $bot->reply('Hello and welcome');
        });
        $botman->hears('start', 
            'App\Http\Controllers\BotManController@startConversation');
        $botman->listen();
    }


    public function startConversation(BotMan $bot)
    {
        $bot->startConversation(new ExampleConversation());
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source