rubium/redsms 问题修复 & 功能扩展

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

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

rubium/redsms

最新稳定版本:v0.2

Composer 安装命令:

composer require rubium/redsms

包简介

Package for send sms via redsms.ru. Based on official PHP class https://github.com/redsms/api-samples-php

关键字:

README 文档

README

Software License Travis Total Downloads

Install

composer require rubium/redsms

php artisan vendor:publish --provider="Rubium\RedSms\RedSmsServiceProvider"

Usage

Package for send sms via redsms.ru. Based on official PHP class https://github.com/redsms/api-samples-php. This is package provide Channel and base Notification.

Create file config/redsms.php with content: (For details please read documentation https://redsms.ru/integration/api/):

<?php

return [
    //Login
    'login' => env('REDSMS_LOGIN', ''),
    //API Key
    'api_key' => env('REDSMS_API_KEY', ''),

    'api_url' => env('REDSMS_API_URL', null),

    'from' => env('REDSMS_PHONE', ''), //

    'sms_sender_name' => env('REDSMS_SMS_SENDER_NAME', 'REDSMS.RU'), //

    'viber_sender_name' => env('REDSMS_VIBER_SENDER_NAME', 'REDSMS.RU'), //
];

Examples:

notify method (notifiable should have phone property):

use Rubium\RedSms\Notifications\RedSms;
...
$user->notify(new RedSms('test'));

In Notification:

  public function via($notifiable)
  {
        return [RedSmsChannel::class];
  }   

  public function toSms($notifiable)
  {
        return [
              'phone' => $this->phone,
              'message' => $this->message
        ];
  }

Facade:

RedSms::send('89881234567', 'test'); // return bool

Testing

Run the tests with:

vendor/bin/phpunit

Credits

Security

If you discover any security-related issues, please email hello@rubium.ru instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固