承接 fighcell/yii2-sms 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

fighcell/yii2-sms

Composer 安装命令:

composer require fighcell/yii2-sms

包简介

Component for sending sms

README 文档

README

This is a component used to send sms, mimic the yii mailer component behaviour

Installation

via composer.json

composer require fighcell/yii2-sms

Usage

Add the component to your main.php.

[
    'components' => [
        'sms' => [
            'class'         => \fighcell\sms\providers\sendsmsro\SendSmsRo::class,
            'viewPath'      => '@common/sms',
            'messageConfig' => [
                'class' => \fighcell\sms\providers\sendsmsro\Message::class,
                'from'  => '0040766123456',           // From number to send from
            ],
            // send all sms to a file by default.
            'useFileTransport' => true, // false for real sending
            'username'         => '{USERNAME}',
            'password'         => '{PASSWORD}',
        ],
    ]
];

Use as follow:

Yii::$app->sms->compose()
    ->setTo('+40766123456')
    ->setMessage("Hey Receiver this is a message sent with SendSms.ro!\n\nThanks!Sender")
    ->send();

This is made using this yii2-extension:

https://www.yiiframework.com/extension/wadeshuler/yii2-sms

02-08-2022 - This extension was removed from Github, so we added the code under the base folder

More details following the link

Extend

Just add your implementation into a new folder in the providers folder. Make sure you extend the AbstractBaseMessage and AbstractSms classes.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2022-09-22