PHPackages                             masrur447/twilio-sdk - 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. [API Development](/categories/api)
4. /
5. masrur447/twilio-sdk

ActiveLibrary[API Development](/categories/api)

masrur447/twilio-sdk
====================

Laravel integration for Twilio SDK

1.0.0(9mo ago)053MITPHPPHP ^8.2

Since Jul 27Pushed 9mo agoCompare

[ Source](https://github.com/masrur447/twilio-sdk)[ Packagist](https://packagist.org/packages/masrur447/twilio-sdk)[ RSS](/packages/masrur447-twilio-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

📞 Twilio SDK for Laravel
========================

[](#-twilio-sdk-for-laravel)

A simple Laravel package that provides an elegant wrapper for sending SMS using the Twilio API.

Developed by [Masrur](https://github.com/masrur447)

---

🚀 Features
----------

[](#-features)

- Easy Twilio integration in Laravel
- Simple API to send SMS
- Configuration via `.env` file

---

🧱 Requirements
--------------

[](#-requirements)

- PHP 8.2 or higher
- Laravel 12x
- Twilio Account &amp; Credentials

---

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require masrur447/twilio-sdk
```

---

⚙️ Configuration
----------------

[](#️-configuration)

### Step 1: Publish the config file

[](#step-1-publish-the-config-file)

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

This will publish the config file to:

```
config/twilio.php

```

### Step 2: Add your credentials in `.env`

[](#step-2-add-your-credentials-in-env)

```
TWILIO_SID=your_twilio_account_sid
TWILIO_TOKEN=your_twilio_auth_token
TWILIO_SENDER_NUMBER=your_twilio_whatsapp_sender_number
TWILIO_SMS_NUMBER=your_twilio_sms_sender_number
```

### Step 3: Example of config/twilio-sdk.php

[](#step-3-example-of-configtwilio-sdkphp)

```
return [
    'account_sid' => env('TWILIO_SID', ''),
    'auth_token' => env('TWILIO_TOKEN', ''),
    'wp_sender' => env('TWILIO_SENDER_NUMBER', ''),
    'sms_sender' => env('TWILIO_SMS_NUMBER', ''),
];
```

---

📤 Usage
-------

[](#-usage)

### ✅ Send Whatsapp Message

[](#-send-whatsapp-message)

```
use Masrur447\TwilioSdk\Twilio;

Twilio::sendWP('+8801234567890', 'Hello from Laravel Twilio SDK!', 'media url or null');
```

### ✅ Send SMS

[](#-send-sms)

```
use Masrur447\TwilioSdk\Twilio;

Twilio::sendSMS('+8801234567890', 'Hello from Laravel Twilio SDK!');
```

---

🧪 Easy way to use it just add trait in user model
-------------------------------------------------

[](#-easy-way-to-use-it-just-add-trait-in-user-model)

```
use InteractsWithTwilio;

$user = User::find(1);
$user->notifyTwilioWhatsapp('Hellow from Laravel trait Twilio SDK', 'media url or null');
$user->notifyTwilioSMS('Hellow from Laravel trait Twilio SDK');
```

🧪 Example: Sending SMS from Controller
--------------------------------------

[](#-example-sending-sms-from-controller)

```
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Masrur447\TwilioSdk\Twilio;

class SmsController extends Controller
{
    public function send(Request $request)
    {
        Twilio::sendSMS($request->phone, $request->message);

        return response()->json([
            'status' => 'SMS sent successfully!',
        ]);
    }
}
```

---

🧪 Example: Tinker Usage
-----------------------

[](#-example-tinker-usage)

```
php artisan tinker
>>> Twilio::sendSMS('+8801234567890', 'Test SMS from tinker');
```

---

🛠 Advanced Usage (Optional)
---------------------------

[](#-advanced-usage-optional)

Coming soon...

---

🤝 Contributing
--------------

[](#-contributing)

Contributions, issues, and feature requests are welcome!
Feel free to check [issues page](https://github.com/masrur447/twilio-sdk/issues) if you want to contribute.

---

🧾 License
---------

[](#-license)

This project is open-sourced under the MIT license.
See the [LICENSE](LICENSE) file for more information.

---

🙌 Author
--------

[](#-author)

**Masrur** — [GitHub](https://github.com/masrur447)

---

🌟 Show your support
-------------------

[](#-show-your-support)

If you like this package, give it a ⭐ on the [GitHub repo](https://github.com/masrur447/twilio-sdk)!

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance56

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

289d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/558bc813875ba01fe993716ded3afc93ad922c593418f18f9ce4e015c90d7cc3?d=identicon)[masrur447](/maintainers/masrur447)

---

Top Contributors

[![masrur447](https://avatars.githubusercontent.com/u/173551743?v=4)](https://github.com/masrur447 "masrur447 (1 commits)")

---

Tags

laravelsdktwiliotwilio-smslaravelsdksmstwilio

### Embed Badge

![Health badge](/badges/masrur447-twilio-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/masrur447-twilio-sdk/health.svg)](https://phpackages.com/packages/masrur447-twilio-sdk)
```

###  Alternatives

[aloha/twilio

Twilio API for Laravel

4733.6M5](/packages/aloha-twilio)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)

PHPackages © 2026

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