Looking to hire Laravel developers? Try LaraJobs

laravel-twilio maintained by 2hmad

Description
Laravel with Twilio Integration
Last update
2022/03/16 21:23 (dev-master)
License
Links
Downloads
92

Comments
comments powered by Disqus

Laravel Twilio

Laravel with Twilio Integration

GitHub forks GitHub stars GitHub license

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