Laravel: Create Telegram Bot Application without Botman Studio
We are using Botman package, and Botman Telegram Driver.
Use Bot Father to create new bot and get the API Token for the bot, store it in
Telegram End Point
Create a route & controller for your Telegram Bot to use after this (webhook).
TelegramController, add the following:
Now you are done preparing for next part.
For development purpose, you can use
valet share to have a live server. For Windows / Linux, you can install ngrok.io to have a live server.
valet shareis actually running a ngrok.
valet share and and then register our app with Telegram using
php artisan botman:telegram:register command.
App\Http\MiddlewareVerifyCsrfToken, disable CSRF token for
One you are done setting up the webhook, open up your Telegram, start talk with your bot,
/hi. You should received response from your bot.