misaf/laravel-sms-gateway-sunway
Composer 安装命令:
composer require misaf/laravel-sms-gateway-sunway
包简介
Sunway driver package for misaf/laravel-sms-gateway.
README 文档
README
Sunway driver package for misaf/laravel-sms-gateway.
This package only provides the sunway driver. It requires the core misaf/laravel-sms-gateway package, which provides the manager, facade, driver contract, and shared sms_gateway configuration file.
Requirements
- PHP 8.2+
- Laravel 10, 11, 12, or 13
misaf/laravel-sms-gateway
Installation
composer require misaf/laravel-sms-gateway misaf/laravel-sms-gateway-sunway
Laravel package discovery registers the driver service provider automatically.
Configuration
Publish the core package configuration if you have not already:
php artisan vendor:publish --tag=sms-gateway-config
Set the default driver and Sunway credentials in .env:
SMS_GATEWAY_DRIVER=sunway SMS_GATEWAY_SUNWAY_GATEWAY=https://sms.sunwaysms.com/smsws/HttpService.ashx SMS_GATEWAY_SUNWAY_USERNAME=your-username SMS_GATEWAY_SUNWAY_PASSWORD=your-password SMS_GATEWAY_SUNWAY_SPECIALNUMBER=3000xxxx
The driver reads from:
'sunway' => [ 'gateway' => env('SMS_GATEWAY_SUNWAY_GATEWAY', 'https://sms.sunwaysms.com/smsws/HttpService.ashx'), 'username' => env('SMS_GATEWAY_SUNWAY_USERNAME', ''), 'password' => env('SMS_GATEWAY_SUNWAY_PASSWORD', ''), 'special_number' => env('SMS_GATEWAY_SUNWAY_SPECIALNUMBER'), ],
Usage
use Misaf\LaravelSmsGateway\Facade\SmsGateway; SmsGateway::driver('sunway')->send()->get('', [ 'method' => 'SendSMS', 'mobile' => '09123456789', 'message' => 'Hello', ]);
Testing
composer test
License
MIT
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-01