oh86/laravel-sms 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oh86/laravel-sms

最新稳定版本:v1.0.0

Composer 安装命令:

composer require oh86/laravel-sms

包简介

sms for laravel

README 文档

README

一、安装

composer require oh86/laravel-sms
php artisan vendor:publish

# 可选
composer require tencentcloud/sms

二、配置

return [
    'default' => env('SMS_DEFAULT_DRIVER', 'tencentCloudApp1'),

    'drivers' => [
        // 
        'tencentCloudApp1' => [
            'service' => 'tencentCloud', // 腾讯云短信服务

            // 云平台配置
            'platform' => [
                'secretId' => env('TENCENT_CLOUD_SECRET_ID'),
                'secretKey' => env('TENCENT_CLOUD_SECRET_KEY'),
                'region' => env('TENCENT_CLOUD_REGION', 'ap-guangzhou'),
            ],
            // 应用配置
            'app' => [
                'appId' => env('TENCENT_CLOUD_SMS_APP_ID'),
                'sign' => env('TENCENT_CLOUD_SMS_SIGN'),
                'templateId' => env('TENCENT_CLOUD_SMS_TEMPLATE_ID'),
            ]
        ],
    ],
];

三、使用示例

SMS::send(['15014153877', '15014153878'], ['123456']);

SMS::driver('tencentCloudApp1')->send(['15014153877', '15014153878'], ['123456']);

四、拓展

1.拓展service

app()->get(\Oh86\SMS\SMSManager::class)->extendService('serviceDemo', function ($app): \Oh86\SMS\Services\SMSServiceInterface {
    // TODO
});

2.拓展driver

app()->get(\Oh86\SMS\SMSManager::class)->extend('driverDemo', function ($app): \Oh86\SMS\Services\SMSServiceInterface {
    // TODO
});

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-12