praskovi04 / telegrand
一个用于与Telegram机器人交互的Laravel Facade
dev-main
2024-08-08 08:50 UTC
Requires
- php: ^8.0
- illuminate/contracts: ^8.37 | ^9.0 | ^10.0
- illuminate/http: ^8.37 | ^9.0 | ^10.00
- illuminate/support: ^8.37 | ^9.0 | ^10.0
- spatie/laravel-package-tools: ^1.12.1
Requires (Dev)
- ext-sqlite3: *
- defstudio/pest-plugin-laravel-expectations: ^v1.10.3
- friendsofphp/php-cs-fixer: ^v3.13.0
- guzzlehttp/guzzle: ^7.5.0
- larastan/larastan: ^1.0.4 | ^2.4.0
- nunomaduro/collision: ^v5.11.0 | ^v6.3.1
- orchestra/testbench: ^v6.25.1 | ^v7.13.0 | ^8.0
- pestphp/pest: ^v1.22.2
- pestphp/pest-plugin-laravel: ^v1.3.0
- pestphp/pest-plugin-mock: ^v1.0.3
- phpstan/extension-installer: ^1.2.0
- phpstan/phpstan-deprecation-rules: ^1.0.0
- phpstan/phpstan-phpunit: ^1.2.2
- phpunit/phpunit: ^9.5.26
- spatie/laravel-ray: ^1.31.0
- spatie/pest-plugin-snapshots: ^1.1.0
- spatie/pest-plugin-test-time: ^1.1.1
- spatie/x-ray: dev-main
This package is auto-updated.
Last update: 2024-09-08 09:05:15 UTC
README
Telegraph 是由 def:studio 开发的Laravel包,用于流畅地与Telegram机器人交互
Telegraph::message('hello world') ->keyboard(Keyboard::make()->buttons([ Button::make('Delete')->action('delete')->param('id', '42'), Button::make('open')->url('https://test.it'), ]))->send();
安装
您可以通过composer安装此包
composer require defstudio/telegraph
发布并启动所需迁移
php artisan vendor:publish --tag="telegraph-migrations"
php artisan migrate
可选地,您可以使用以下命令发布配置和翻译文件
php artisan vendor:publish --tag="telegraph-config"
php artisan vendor:publish --tag="telegraph-translations"
使用 & 文档
在创建新机器人并将其添加到聊天/群组/频道(如我们的文档中所述此处)之后,可以使用 Telegraph
facade轻松发送消息并与它交互
Telegraph::message('this is great')->send();
详细文档可在以下位置找到
https://docs.defstudio.it/telegraph
测试
composer test
更新日志
有关最近更改的更多信息,请参阅更新日志。在Twitter上关注我们以获取有关此包的更多更新[Follow Us]。
贡献
有关详细信息,请参阅贡献指南。
安全漏洞
有关如何报告安全漏洞,请参阅我们的安全策略。
致谢
- Fabio Ivona
- def:studio 团队
- Andrea Marco Sartori 为他的精彩想法
- Alberto Pieripolli Pest 徽章
- Joris Drenth 文档修复和升级
- 所有贡献者
翻译者
- Tievo 西班牙语
- Andrey Helldar 俄语
- Joris Drenth 荷兰语
- Moayed Alhagy 阿拉伯语
- Rafael 葡萄牙语
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。