PHPackages                             zblue89/sms - 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. zblue89/sms

ActiveLibrary

zblue89/sms
===========

Using different SMS gateway to send SMS for different phone number format

2.0.0(9y ago)0108PHPPHP &gt;=5.5.9

Since Dec 18Pushed 9y agoCompare

[ Source](https://github.com/zblue89/php-sms)[ Packagist](https://packagist.org/packages/zblue89/sms)[ RSS](/packages/zblue89-sms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

PHP SMS
=======

[](#php-sms)

The purpose of this package is to allow the user to use different SMS gateway to send the SMS to different phone number format.

For example, you may use Twilio to send SMS to US phone number, and Plivo to send SMS to Malaysian phone number.

Currently the package just support 4 SMS gateways, which are log (show the message in log file), Twilio, Plivo, and Generic (perform HTTP POST to the configured URL). If you are to use Twilio and/or Plivo, you have to include `twilio\twilio-sdk` and/or `plivo/plivo` in your project.

Installation
============

[](#installation)

1. Add `zblue89\php-sms` to your composer:

    ```
     composer require zblue89\php-sms

    ```
2. Add `\Zblue89\Sms\SmsServiceProvider::class` into `providers` section in `config\app.php` file.

    ```
     'providers' => [
         ...
         Zblue89\Sms\SmsServiceProvider::class
         ...
     ]

    ```
3. Add `'SMS' => Zblue89\Sms\Facades\SMS::class` into `aliases` section in `config\app.php` file.

    ```
     'aliases' => [
         ...
         'SMS' => Zblue89\Sms\Facades\SMS::class,
         ...
     ]

    ```
4. Copy `sms.php` configuration file from `vendor\zblue89\php-sms\src\config` folder to `config` folder.

Configuration
=============

[](#configuration)

You may provide multiple sets of SMS configuration in `config/sms.php`.

`format` - the phone number regular expression format. E.g. `/^60\d+$/` for Malaysian phone number.

`gateway` - the SMS gateway to be used for the provided `format`. Currently it only supports `log`, `twilio`, `plivo`, and `generic`.

The following configuration are required for Plivo SMS gateway:

`plivo_auth_id` - Plivo Authentication ID

`plivo_auth_token` - Plivo Authentication Token

`plivo_source` - Source for Plivo

The following configuration are required for Twilio SMS gateway:

`twilio_sid` - Twilio SID

`twilio_auth_token` - Twilio Authentication Token

`twilio_from_number` - Twilio From Number

The following configuration are required for Generic SMS gateway:

`generic_url` - POST URL

`generic_parameters` - Additional parameters to be included during the HTTP POST

`generic_phone_number_parameter_name` - Parameter name for Phone Number during the HTTP POST

`generic_message_parameter_name` - Parameter name for Message during the HTTP POST

`generic_good_response` - Expected response body from HTTP POST. An exception will be thrown if the response body does not match with this value. This value is nullable. If it is null, the process is considered as success all the time.

Example of configuration:
=========================

[](#example-of-configuration)

```
[
	'format' => '/^60\d+$/,
	'gateway' => 'plivo',
	'plivo_auth_id' => 'XXXXXXX'
	'plivo_auth_token' => 'XXXXXX',
	'plivo_source' => 'tapway'
],
[
	'format' => '/^65\d+$/,
	'gateway' => 'twilio',
	'twilio_sid' => 'XXXXXXX'
	'twilio_auth_token' => 'XXXXXX',
	'twilio_from_number' => '0123456789'
]

```

Usage
=====

[](#usage)

Using SMS provider service is very simple:

```
SMS::send('', '');

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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 ~652 days

Total

2

Last Release

3517d ago

Major Versions

1.0.0 → 2.0.02016-09-30

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/9312f5375400138cab064ebae3614590fc056aff4eb15da4951473ef69fc97e1?d=identicon)[zblue89](/maintainers/zblue89)

---

Top Contributors

[![zblue89](https://avatars.githubusercontent.com/u/7598878?v=4)](https://github.com/zblue89 "zblue89 (7 commits)")

---

Tags

smslaravel5

### Embed Badge

![Health badge](/badges/zblue89-sms/health.svg)

```
[![Health](https://phpackages.com/badges/zblue89-sms/health.svg)](https://phpackages.com/packages/zblue89-sms)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.5M178](/packages/illuminate-broadcasting)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

74310.9M66](/packages/laravel-mcp)[illuminate/mail

The Illuminate Mail package.

5910.1M391](/packages/illuminate-mail)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)

PHPackages © 2026

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