setiawanhu / laravel-madeline-proto
一个第三方Telegram客户端库,为Laravel提供danog/MadelineProto包装
1.3.0
2021-10-28 12:43 UTC
Requires
- php: ^7.4|^8.0
- danog/madelineproto: ^6
- illuminate/console: ^7.0|^8.0
- illuminate/database: ^7.0|^8.0
- illuminate/support: ^7.0|^8.0
Requires (Dev)
- phabel/phabel: ^1.0
README
一个第三方Telegram客户端库danog/MadelineProto的Laravel包装。
入门指南
将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帮助我编写可读性强的文档。