Christoph Rumpel, lead developer on the BotMan project has a new post to his site walking you through the process and code he used to create a LaravelQuiz chatbot using a combination of the library and Laravel.
Ever wondered how well you know your favorite PHP framework Laravel? Give the LaravelQuiz Chatbot a try, and you will find out. This article is a step by step guide on how I created this chatbot with BotMan and Laravel.
He starts off by introducing the project and what some of the basic features are. Next comes some of the setup, including the
botman command line tool and the creation of the BotMan-based project. As the tool uses a connection to Telegram, he also installs the client library for that and sets up the related credentials. Next comes the storage of the questions and answers (migrations and models) and the creation of the
QuizConversation class to handle the interactions. There's also code examples for showing the current quiz status, making a "high score" list, and a few other extras. All code and command line calls you need are included in the post.