php-core/laravel-madeline-proto
最新稳定版本:v0.0.1
Composer 安装命令:
composer require php-core/laravel-madeline-proto
包简介
A third party Telegram client library danog/MadelineProto wrapper for Laravel
README 文档
README
A third party Telegram client library danog/MadelineProto wrapper for Laravel. Updated to support latest MadelineProto and PHP 8.4 by PHPCore
Getting Started
Add the laravel-madeline-proto to the project dependency:
composer require php-core/laravel-madeline-proto
Then publish the telegram.php config file:
php artisan vendor:publish --provider="PHPCore\MadelineProto\MadelineProtoServiceProvider"
Set up the Telegram API key by providing env variables:
MP_TELEGRAM_API_ID=... //your telegram api id here MP_TELEGRAM_API_HASH=... //your telegram api hash here
This wrapper package supports for running both single / multiple telegram account.
Dig Deeper
Please check wiki for more details about laravel-madeline-proto usage
Testing
Automated Testing
This package uses Pest PHP for automated testing. To run the test suite:
composer test
For more details on automated testing, see TESTING.md.
Manual Testing with Telegram
To test the package with actual Telegram API connections locally:
- Copy
.env.exampleto.envand add your credentials - Run the test script:
php test-telegram.php - Send test messages:
php test-send-message.php "Hello!"
For detailed instructions, see MANUAL_TESTING.md.
Integration Tests
Run integration tests that interact with real Telegram API:
export MP_INTEGRATION_TESTS=true
vendor/bin/pest tests/Integration
These tests will send actual messages to the chat ID configured in MP_TEST_CHAT_ID (defaults to "me" for Saved Messages).
Notes
-
This wrapper package is still not wrapping all the apis yet, I'm still focusing on wrapping the messages api.
-
If you can't find the method that you want in Messages facade or need to use the default danog/MadelineProto api, you might want to use
MadelineProto::getClient()facade method. It will returndanog\MadelineProto\APIobject where you can call all the method provided by the danog/MadelineProto library.
Thanks To
setiawanhu for the base version this package is based on
Bryan Ramaputra for helping me to write readable documentations.
统计信息
- 总下载量: 472
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-only
- 更新时间: 2025-10-16