{"repo":"Mirmuxsin/laragram","free":true,"listed":false,"github":"https://github.com/Mirmuxsin/laragram","clone":"git clone https://github.com/Mirmuxsin/laragram.git","description":"Laravel package to develop telegram bot inside laravel project","language":"PHP","stars":42,"topics":["laravel","telegram","telegram-bot"],"license":"MIT","category":"chat-messaging","readme_excerpt":"LARAGRAM Simple laravel package to use telegram bot API inside your laravel project [//]: # ( Check it out how easily you can send me a message ) --- - Features - Installation - Usage --- Features It has every method of telegram bot api: Which are fully documented: Now you don't have to remember which property is in which object, because they are documented too): Which you can get directly throuhg your function: BTW, you can call many of them at once: It supports FSM-Routing: --- Installation This package requires PHP 8.0+ First, install Laragram package, and make sure that the database connection settings are correct! Then run these commands to publish assets and config Add your telegram bot token to .env Run migration to be able to use FSM-Routing If you want to get updates, set webhook to your adress (like domain.com/api/bot) where you handle updates And here we go, you can start your bot now --- Usage: - Local development: - Methods: php use Milly\\Laragram\\Types\\Message; // with variable $message = new Message(); $text = $message- text; // inside the function function getText(Message $message) { $text = $message- text; } php // routes/api.php use Milly\\Laragram\\FSM\\FSM; use Milly\\Laragram\\Laragram; Route::post('/bot', function () { FSM::route('state 1', [SomeClass::class, 'someMethod']); FSM::route('state 2', function (Message $message) { Laragram::sendMessage( $message- chat- id, null, \"Inside anonymous function\" ); }); } php // routes/laragram.php use App\\Http\\Controlle","default_branch":null,"files":null,"tree":[],"storefront":"/r/Mirmuxsin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Mirmuxsin/laragram/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}