laravel-twilio maintained by 2hmad
Description
Laravel with Twilio Integration
Author
Last update
2022/03/16 21:23
(dev-master)
License
Downloads
92
Laravel Twilio
Laravel with Twilio Integration
Installation
Begin by installing this package through Composer. Run this command from the Terminal:
composer require 2hmad/laravel-twilio
Configurations
to publish the config file, run:
php artisan vendor:publish --tag=laraveltwilio-config
This is the content of the config file that will be published at config/laraveltwilio.php
Next, edit your .env file with your Twilio Credentials
TWILIO_ACCOUNT_SID=xxxx
TWILIO_AUTH_TOKEN=xxxx
TWILIO_SMS_FROM=xxxx
Usage
To send a SMS message, you can use the notify() method available on the LaravelTwilio Facade
<?php
use Dot2hmad\LaravelTwilio\Facades\LaravelTwilio;
$sendSms = LaravelTwilio::notify('+2341234567892', 'Hello')
return $sendSms;
License
laravel-twilio is open-sourced software licensed under the MIT license