shaz3e/twilio 问题修复 & 功能扩展

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

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

shaz3e/twilio

最新稳定版本:v1.1.0

Composer 安装命令:

composer require shaz3e/twilio

包简介

Send SMS with Twilio in your Laravel Application

README 文档

README

Packagist Version Packagist Downloads License Laravel Version

Introduction

This is a Laravel package for sending SMS with Twilio

Installation

You can install the package via composer by running the following command in your terminal

composer require shaz3e/twilio

Publishing Configurations

Publish config only

php artisan vendor:publish --tag=twilio-config

This is the content of the config file that will be published at config/twilio.php

<?php

return [
    'twilio_sid' => env('TWILIO_ACCOUNT_SID'),
    'twilio_token' => env('TWILIO_AUTH_TOKEN'),
    'twilio_from' => env('TWILIO_SMS_FROM'),
];

Update .env file

Next, edit your .env file with your Twilio Credentials TWILIO_ACCOUNT_SID=xxxxx TWILIO_AUTH_TOKEN=xxxxx TWILIO_SMS_FROM=+xxxxx

Usage

To send a SMS message, you can use the notify() method available on the Twilio Facade

<?php

use Shaz3e\Twilio\Facades\Twilio;

$sendSms = Twilio::notify('+123456789', 'Hello')

return $sendSms;

To send WhatsAp message you can use the notifyWhatsApp method available on the Twilio Facade

<?php

use Shaz3e\Twilio\Facades\Twilio;

$sendWhatsApp = Twilio::notifyWhatsApp('+123456789', 'Hello')

return $sendWhatsApp;

Contributing

License

Twilio is licensed under the MIT license. Enjoy!

Credit

GitHub commit activity

GitHub Stats

GitHub Contributions Graph

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-15