BotMan is a framework agnostic PHP library that is designed to simplify the task of developing innovative bots for multiple messaging platforms, known as chatbots today. You can use it to build simple command-bots as well as advanced conversational interfaces.
Right now these messengers are included: Slack, Telegram, Microsoft Bot Framework, Nexmo, HipChat, Facebook Messenger and WeChat.
Yes you can. Build your own driver to connect BotMan with other messengers or to use it as an API.
Both platforms are available through given middlewares. They help you to understand the user's message and provide information about their intent. You can of course create your own middleware.
As already mentioned BotMan is a framework agnostic PHP library. So yes, it works without Laravel too. If you do want use Laravel, checkout the BotMan Studio project.
BotMan requires PHP >=7.0.
BotMan provides a Conversation object that is used to string together several messages, including questions for the user, into a cohesive unit. In order to always know the current state of the conversation, the object gets saved through the cache.
If not specified otherwise, BotMan will use array cache which is non-persistent. When using the Laravel facade it will automatically use the Laravel Cache component. Symfony and Codeigniter caches are also supported.
Laravel protects your application from cross-site request forgery (CSRF) attacks and as a result all requests are subject to a CSRF token verification. As the token is not passed along with the request from Facebook you need to exclude your webhook from CSRF checks.
You can exclude the routes by adding their URIs to the $except property of the VerifyCsrfToken middleware.