combindma/laravel-twilio
最新稳定版本:2.4.0
Composer 安装命令:
composer require combindma/laravel-twilio
包简介
Laravel Twillio SMS API Integration
README 文档
README
Laravel Twillio SMS API IntegrationLaravel Twillio SMS API Integration
Installation
You can install the package via composer:
composer require combindma/laravel-twilio
You can publish the config file with:
php artisan vendor:publish --tag="laravel-twilio-config"
This is the contents of the published config file:
return [ /* |-------------------------------------------------------------------------- | SID |-------------------------------------------------------------------------- | | Your Twilio Account SID # | */ 'sid' => env('TWILIO_SID', ''), /* |-------------------------------------------------------------------------- | Access Token |-------------------------------------------------------------------------- | | Access token that can be found in your Twilio dashboard | */ 'token' => env('TWILIO_AUTH_TOKEN', ''), /* |-------------------------------------------------------------------------- | From Number |-------------------------------------------------------------------------- | | The Phone number registered with Twilio that your SMS & Calls will come from | */ 'from' => env('TWILIO_NUMBER', ''), /* |-------------------------------------------------------------------------- | Whatsapp Number |-------------------------------------------------------------------------- | | The Phone number registered with Twilio that your Whatsapp Messages will come from | */ 'whatsapp' => env('TWILIO_WHATSAPP', ''), /* |-------------------------------------------------------------------------- | Enable |-------------------------------------------------------------------------- | | Enable or disable script rendering. Useful for local development. | */ 'enabled' => env('TWILIO_ENABLED', true), ];
Usage
use Combindma\Twilio\Facades\Twilio; //Simple SMS message Twilio::message($phone, $message); //Send a Message with a Messaging Service Twilio::messageWithService($phone, $message, $serviceId); //Send a message with WhatsApp Twilio::whatsapp($phone, $message); //Send a WhatsApp message using a message template & service $content = [ "1" => "Name", "2" => "link", ] Twilio::whatsappWithTemplate($phone, $serviceId, $templateId, array $content);
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 227
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-21