- PHP >=5.6
- Telegram Bot API Token - Talk to @BotFather and generate one
- Laravel >=5 (Optional)
Telegram Bot SDK utilizes Composer to manage its dependencies. So, before using the SDK, make sure you have Composer installed on your machine.
Install the Telegram Bot SDK using Composer:
composer require irazasyed/telegram-bot-sdk:^2.0
Telegram Bot SDK will self-register its service provider and facade in Laravel >=5.5.
If you're using Laravel
<5.5, you'll manually have to register the service provider and facade.
'Telegram' => Telegram\Bot\Laravel\Facades\Telegram::class,
Publish Configuration File
Publish the configuration file by running this command in your terminal window:
php artisan vendor:publish --provider="Telegram\Bot\Laravel\TelegramServiceProvider"