lebuhorskiy / laravel-madeline-proto-php8
用于 Laravel 的第三方 Telegram 客户端库 danog/MadelineProto 封装
1.0.0
2023-11-09 20:59 UTC
Requires
- php: ^7.4|^8.2
- danog/madelineproto: ^8
- illuminate/console: ^7.0|^8.0
- illuminate/database: ^7.0|^8.0
- illuminate/support: ^7.0|^8.0
Requires (Dev)
- phabel/phabel: ^1.0
This package is auto-updated.
Last update: 2024-09-09 22:50:08 UTC
README
用于 Laravel 的第三方 Telegram 客户端库 danog/MadelineProto 封装。
入门指南
将 laravel-madeline-proto 添加到项目依赖项
composer require setiawanhu/laravel-madeline-proto
然后发布 telegram.php
配置文件
php artisan vendor:publish --provider="Hu\MadelineProto\MadelineProtoServiceProvider"
通过提供环境变量设置 Telegram API 密钥
MP_TELEGRAM_API_ID=... //your telegram api id here MP_TELEGRAM_API_HASH=... //your telegram api hash here
此封装包支持运行单个/多个 Telegram 账户。
深入了解
请查阅 wiki 获取关于 laravel-madeline-proto 使用更详细的信息
注意
-
此封装包尚未封装所有 API,我仍在专注于封装消息 API。
-
如果您在 Messages 门面中找不到您想要的方法或需要使用默认的 danog/MadelineProto API,您可能希望使用
MadelineProto::getClient()
门面方法。这将返回danog\MadelineProto\API
对象,您可以在其中调用 danog/MadelineProto 库提供的所有方法。
感谢
Bryan Ramaputra 帮助我编写可读性强的文档。