dilumsadeepa/dev-sms-gateway-laravel-package
Composer 安装命令:
composer require dilumsadeepa/dev-sms-gateway-laravel-package
包简介
Laravel package for Puppy SMS Gateway (auth, environments, API keys, SMS send/status)
README 文档
README
Laravel package for integrating with puppy-sms-gateway-server.
It supports:
- user register/login
- environment creation
- environment API key management
- SMS send via environment API key
- status polling and account logs
Requirements
- PHP 8.1+
- Laravel 9/10/11/12
guzzlehttp/guzzle(installed automatically)
Install
Option 1: Packagist (after publish)
composer require dilumsadeepa/dev-sms-gateway-laravel-package
Option 2: GitHub VCS (before Packagist)
composer config repositories.dev-sms-gateway vcs https://github.com/dilumsadeepa/DEV-SMS-Gateway-Laravel-package.git composer require dilumsadeepa/dev-sms-gateway-laravel-package:dev-main
Publish Config
php artisan vendor:publish --tag=puppy-sms-gateway-config
Configuration
Set values in your Laravel .env:
PUPPY_SMS_GATEWAY_BASE_URL=http://127.0.0.1:8090 # Environment API key (used for send/status) PUPPY_SMS_GATEWAY_API_KEY= # Auth token (used for account endpoints: /api/auth/me, /api/environments, /api/account/logs) PUPPY_SMS_GATEWAY_AUTH_TOKEN= # Optional default pin. Not required when using environment API key. PUPPY_SMS_GATEWAY_PIN= PUPPY_SMS_GATEWAY_TIMEOUT=20 PUPPY_SMS_GATEWAY_SEND_ENDPOINT=/api/send-sms PUPPY_SMS_GATEWAY_HEALTH_ENDPOINT=/health PUPPY_SMS_GATEWAY_STATUS_ENDPOINT=/api/status PUPPY_SMS_GATEWAY_LOGS_ENDPOINT=/api/account/logs PUPPY_SMS_GATEWAY_REGISTER_ENDPOINT=/api/auth/register PUPPY_SMS_GATEWAY_LOGIN_ENDPOINT=/api/auth/login PUPPY_SMS_GATEWAY_ME_ENDPOINT=/api/auth/me PUPPY_SMS_GATEWAY_LOGOUT_ENDPOINT=/api/auth/logout PUPPY_SMS_GATEWAY_ENVIRONMENTS_ENDPOINT=/api/environments
Quick Start (Full Flow)
use Puppy\SmsGateway\Laravel\Facades\PuppySmsGateway; // 1) Register (creates account only) PuppySmsGateway::register('Alice', 'alice@example.com', 'StrongPass123'); // 2) Login $login = PuppySmsGateway::login('alice@example.com', 'StrongPass123'); $token = $login['token']; PuppySmsGateway::setAuthToken($token); // 3) Create environment (returns default environment API key) $environment = PuppySmsGateway::createEnvironment( name: 'Production', pin: '1234', description: 'Main Android device', metadata: ['region' => 'us'] ); $apiKey = $environment['apiKey']; PuppySmsGateway::setApiKey($apiKey); // 4) Send SMS with environment API key $send = PuppySmsGateway::send('+14075551234', 'Hello from Laravel package'); // 5) Poll status (uses API key by default) $status = PuppySmsGateway::status($send['requestId']);
Common Operations
use Puppy\SmsGateway\Laravel\Facades\PuppySmsGateway; $health = PuppySmsGateway::health(); $me = PuppySmsGateway::me(); $environments = PuppySmsGateway::environments(); $apiKeys = PuppySmsGateway::listApiKeys('<environment-id>'); $newKey = PuppySmsGateway::createApiKey('<environment-id>', 'backend-service'); $revoke = PuppySmsGateway::revokeApiKey('<environment-id>', '<key-id>'); $logs = PuppySmsGateway::logs(); // requires auth token
Notes
send()requires an environment API key.status()accepts either API key or auth token.logs()uses account endpoint and requires auth token.- If SMS device acknowledgement times out,
send()returns a pending-style response from the server.
License
MIT
dilumsadeepa/dev-sms-gateway-laravel-package 适用场景与选型建议
dilumsadeepa/dev-sms-gateway-laravel-package 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sms」 「gateway」 「notification」 「laravel」 「api-key」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dilumsadeepa/dev-sms-gateway-laravel-package 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dilumsadeepa/dev-sms-gateway-laravel-package 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dilumsadeepa/dev-sms-gateway-laravel-package 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
This package makes it easy to send notifications via AfricasTalking with Laravel
Payyo Gateway for the Omnipay payment processing library
Apple Push Notification & Feedback Provider
Throttle notifications on a per-channel basis
SDK for payment gateway PlatbaMobilom.sk for PHP7.0
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-23