LaravelPackages.net
Acme Inc.
Toggle sidebar
oclock/twilio-messenger

The Laravel Twilio SMS package provides a seamless integration of the Twilio SMS/Whatsapp service into your Laravel applications. With this package, you can easily send SMS/Whatsapp messages using the powerful Twilio PHP SDK without the need for extensive manual configuration.

16
0
1.0.1
About oclock/twilio-messenger

oclock/twilio-messenger is a Laravel package for the laravel twilio sms package provides a seamless integration of the twilio sms/whatsapp service into your laravel applications. with this package, you can easily send sms/whatsapp messages using the powerful twilio php sdk without the need for extensive manual configuration.. It currently has 0 GitHub stars and 16 downloads on Packagist (latest version 1.0.1). Install it with composer require oclock/twilio-messenger. Discover more Laravel packages by oclock or browse all Laravel packages to compare alternatives.

Last updated

Twilio Messenger

This is sample Laravel Package to be used to use twilio/sdk services

Getting started

composer require oclock/twilio-messenger

Update .ENV

TWILIO_SID=xxxxxxxxxxxx TWILIO_TOKEN=xxxxxxxxxx TWILIO_FROM_NUMBER=+xxxxxx TWILIO_WHATSAPP=+xxxxxxx

Add the below code to app.php under service prodiver if not discovered automatically in Lower versions of laravel

Oclock\TwilioMessenger\TwilioServiceProvider::class

Sample Code

namespace App\Http\Controllers; 

use Illuminate\Http\Request; 
use Oclock\TwilioMessenger\TwilioService; 

class HomeController extends Controller 
{
    //
    public function index(Request $request, TwilioService $twilio)
    {
        if($request->phonenumber && $request->message){
            $media = 'Your media url';
            $send =  $twilio->sendWhatsapp($request->phonenumber, $request->message, $media);
        }
        
    }
}
Comments