2hmad/laravel-twilio

Laravel with Twilio Integration

1.0.2 2022-03-15 23:01 UTC

This package is auto-updated.

Last update: 2024-04-17 01:22:16 UTC


README

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