PHPackages                             developers-desk/laravel-twilio - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. developers-desk/laravel-twilio

ActiveLibrary[Framework](/categories/framework)

developers-desk/laravel-twilio
==============================

The Laravel Twilio Integration.

1.2.1(5mo ago)29MITPHPPHP ^8.2

Since Jan 11Pushed 5mo agoCompare

[ Source](https://github.com/developers-desk/laravel-twilio)[ Packagist](https://packagist.org/packages/developers-desk/laravel-twilio)[ Docs](https://github.com/developers-desk/laravel-twilio)[ RSS](/packages/developers-desk-laravel-twilio/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (13)Versions (6)Used By (0)

Laravel Twilio
==============

[](#laravel-twilio)

A clean, Laravel-idiomatic Twilio integration package for SMS and WhatsApp (template-based) messaging.

Designed with proper separation of concerns, a stable public API, and future extensibility in mind.

Features
--------

[](#features)

- Send SMS using Twilio API
- Send WhatsApp template messages (ContentSid based)
- Facade-based API (Twilio::sms(), Twilio::whatsapp())
- Clean architecture (Service → Client → Resource)
- Laravel 9 / 10 / 11 / 12 compatible
- Configurable via .env or published config
- Testable (fixtures + HTTP fakes)

Installation
------------

[](#installation)

Install via Composer

```
composer require developers-desk/laravel-twilio
```

Configuration Publish config (optional)

```
php artisan vendor:publish --tag=twilio-config

```

This will publish:

```
config/twilio.php

```

Publishing is optional. If not published, values are read directly from environment variables. .env

```
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_FROM=1234567890
TWILIO_FROM_WHATSAPP=1234567890

```

**Do not rename config keys.**Only change values. Renaming keys will break the package.

Usage
-----

[](#usage)

Send SMS

```
use DevelopersDesk\LaravelTwilio\Facades\Twilio;

Twilio::sms(
    "+919999999999",
    "Hello from Laravel Twilio"
);

```

Send WhatsApp Template Message

Twilio WhatsApp requires templates (ContentSid) for business-initiated messages.

```
use DevelopersDesk\LaravelTwilio\Facades\Twilio;

Twilio::whatsapp(
    "+919999999999",
    "HXxxxxxxxxxxxxx",
    [
        "1" => "John",
        "2" => "17-January-2026",
        "3" => "20-January-2026",
    ]
);

```

- ContentVariables are automatically JSON-encoded
- whatsapp: prefix is handled internally
- Free-form WhatsApp messages are not supported by default

Architecture Overview
---------------------

[](#architecture-overview)

This package follows a clean Laravel package architecture:

```
Facade (public API)
   ↓
Service (use-cases)
   ↓
HTTP Client (Twilio transport)
   ↓
Resource (request definition)

```

Why this matters

- Easy to extend (Verify, Voice, WhatsApp session messages)
- Easy to test (HTTP layer isolated)
- No framework leakage into core logic
- Clear responsibilities

Testing
-------

[](#testing)

- Tests include:
- Fixture-based tests
- HTTP-fake-friendly design
- Optional live credential testing for manual verification

Run tests:

```
vendor/bin/phpunit

```

Live Twilio credentials should be used only for manual smoke testing, not CI.

WhatsApp Notes (Important)

- WhatsApp template messages only
- Requires approved ContentSid
- Free-form messages depend on session state and are intentionally not exposed
- This avoids unreliable behavior and production issues

Roadmap
-------

[](#roadmap)

- WhatsApp session-based messages (explicit API)
- Twilio Verify (OTP)
- Message status lookup
- Retry &amp; failure handling
- Laravel Notification channel

Maintainer Notes
----------------

[](#maintainer-notes)

- Facade aliases are auto-discovered
- Config keys are treated as public API
- No business logic in Service Providers
- Designed for long-term maintenance, not demos

License

---------

[](#license-)

MIT © Chandni Soni

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance70

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

167d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32850588?v=4)[Developer's Desk](/maintainers/developers-desk)[@developers-desk](https://github.com/developers-desk)

---

Top Contributors

[![developers-desk](https://avatars.githubusercontent.com/u/32850588?v=4)](https://github.com/developers-desk "developers-desk (12 commits)")

---

Tags

laravel-packagelaravel-twiliotwilio-apitwilio-integrationframeworklaraveltwiliointegration

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/developers-desk-laravel-twilio/health.svg)

```
[![Health](https://phpackages.com/badges/developers-desk-laravel-twilio/health.svg)](https://phpackages.com/packages/developers-desk-laravel-twilio)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k108.5M885](/packages/laravel-socialite)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k21.5M594](/packages/laravel-boost)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
