Download the PHP package milly/laragram without Composer
On this page you can find all versions of the php package milly/laragram. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download milly/laragram
More information about milly/laragram
Files in milly/laragram
Package laragram
Short Description Laravel package to develop telegram bot inside laravel project
License MIT
Informations about the package laragram
LARAGRAM
Simple laravel package to use telegram bot API inside your laravel project
[//]: # ( Check it out how easily you can send me a message
)
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; }
- FSM Routing:
2.3 version
-
Support for anonymous functions inside route definition
-
State management now supports regexp as status
- minor fixes
Use it inside laravel project as a package and you will be able to use all features, including:
- route middleware
- multi-lang
- guards
- CLI
- migration
- and others and others
Changes:
All versions of laragram with dependencies
guzzlehttp/guzzle Version ^7.2
ext-json Version *