承接 axelhub/twilio 相关项目开发

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

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

axelhub/twilio

最新稳定版本:1.0

Composer 安装命令:

composer require axelhub/twilio

包简介

Axel's sms send package

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Twilio sms sender

Installation

composer require axelhub/twilio

After installing run command below. It will create twilio.php file in config folder.

php artisan twilio:install

Configure twilio.php file with Twilio key, secret, sid and from by adding variables below to your .env file:

TWILIO_APP_KEY=
TWILIO_APP_SECRET=
TWILIO_APP_SID=
TWILIO_APP_FROM=

Also, in the twilio.php file you can customize the list of countries where the app will be able to send messages. List of countries.

Using

Custom using

$twilio = new Twilio();
$twilio->sendSms($PhoneNumber, $Message);

Using with Laravel notification

More about laravel notifications.

Add SmsChannel::class class into via function in notification:

use Axel\Twilio\SmsChannel;

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

Create toSms() function in notification class:

use Axel\Twilio\SmsMessage;

public function toSms($notifiable): SmsMessage
{
    return (new SmsMessage)
        ->to($PhoneNumber)
        ->message($Message);
}

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固