tobya / telegraph
A laravel facade to interact with Telegram Bots
Fund package maintenance!
fabio-ivona
defstudio
paypal.me/bdmstore
Requires
- php: ^8.1
- illuminate/contracts: ^10.0 | ^11.0
- illuminate/http: ^10.0 | ^11.0
- illuminate/support: ^10.0 | ^11.0
- spatie/laravel-package-tools: ^1.12.1
Requires (Dev)
- ext-sqlite3: *
- defstudio/pest-plugin-laravel-expectations: ^v2.1.2
- friendsofphp/php-cs-fixer: ^v3.13.0
- guzzlehttp/guzzle: ^7.5.0
- larastan/larastan: ^1.0.4 | ^2.4.0
- nunomaduro/collision: ^v7.10.0 | ^v8.1.1
- orchestra/testbench: ^8.0 | ^9.0
- pestphp/pest: ^v2.34.2
- pestphp/pest-plugin-laravel: ^v2.3.0
- pestphp/pest-plugin-mock: ^v2.0.0
- phpstan/extension-installer: ^1.2.0
- phpstan/phpstan-deprecation-rules: ^1.0.0
- phpstan/phpstan-phpunit: ^1.2.2
- spatie/laravel-ray: ^1.31.0
- spatie/pest-plugin-snapshots: ^2.1.0
- spatie/pest-plugin-test-time: ^2.1.0
- spatie/x-ray: dev-main
This package is auto-updated.
Last update: 2024-10-23 20:36:46 UTC
README
Telegraph is a Laravel package for fluently interacting with Telegram Bots made by def:studio
Telegraph::message('hello world') ->keyboard(Keyboard::make()->buttons([ Button::make('Delete')->action('delete')->param('id', '42'), Button::make('open')->url('https://test.it'), ]))->send();
Installation
You can install the package via composer:
composer require defstudio/telegraph
Publish and launch required migrations:
php artisan vendor:publish --tag="telegraph-migrations"
php artisan migrate
Optionally, you can publish the config and translation file with:
php artisan vendor:publish --tag="telegraph-config"
php artisan vendor:publish --tag="telegraph-translations"
Usage & Documentation
After a new bot is created and added to a chat/group/channel (as described in our documentation),
the Telegraph
facade can be used to easily send messages and interact with it:
Telegraph::message('this is great')->send();
An extensive documentation is available at
https://docs.defstudio.it/telegraph
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently. Follow Us on Twitter for more updates about this package.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Fabio Ivona
- def:studio team
- Andrea Marco Sartori for his cool ideas
- Alberto Pieripolli Pest badge
- Joris Drenth Docs fix and upgrade
- All Contributors
Translators
- Tievo Spanish
- Andrey Helldar Russian
- Joris Drenth Dutch
- Moayed Alhagy Arabic
- Rafael Portuguese
License
The MIT License (MIT). Please see License File for more information.