PHPackages                             gr8shivam/laravel-sms-api - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. gr8shivam/laravel-sms-api

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

gr8shivam/laravel-sms-api
=========================

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

4.1.0(4mo ago)10241.4k↑97.4%33MITPHPPHP ^8.1CI failing

Since Mar 24Pushed 4mo ago7 watchersCompare

[ Source](https://github.com/gr8shivam/laravel-sms-api)[ Packagist](https://packagist.org/packages/gr8shivam/laravel-sms-api)[ Docs](https://github.com/gr8shivam/laravel-sms-api)[ RSS](/packages/gr8shivam-laravel-sms-api/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (8)Versions (15)Used By (0)

[![Packagist](https://camo.githubusercontent.com/038acc71d63254281cbaf75a551419036c697192c325b41feb141333fa44d8a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67723873686976616d2f6c61726176656c2d736d732d6170692e737667)](https://packagist.org/packages/gr8shivam/laravel-sms-api)[![Packagist](https://camo.githubusercontent.com/56c3fb8e28ae1043014003c10b1d6d595cffb4f08fd69bddd7438e7f7ac7241b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67723873686976616d2f6c61726176656c2d736d732d6170692e737667)](https://packagist.org/packages/gr8shivam/laravel-sms-api)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/gr8shivam/laravel-sms-api/blob/master/LICENSE)[![Laravel](https://camo.githubusercontent.com/36ab9eb40d419c375ec1c19e6d5fd0d5ae0aeb01372cc6b164966c412feecdad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302532422d7265642e737667)](https://laravel.com)[![PHP](https://camo.githubusercontent.com/7535257ca228724c93658bd52583d4e47a9bab02c356abf6e54c1d575f2151e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e737667)](https://php.net)

Laravel SMS API
===============

[](#laravel-sms-api)

A modern, flexible Laravel package for integrating any SMS gateway that provides a REST API. Perfect for Laravel 10+ applications with full support for notifications, multiple gateways, and modern authentication methods.

#### [⭐ Star this repo](https://github.com/gr8shivam/laravel-sms-api) to show support!

[](#-star-this-repo-to-show-support)

---

📋 Table of Contents
-------------------

[](#-table-of-contents)

- [Features](#-features)
- [Requirements](#-requirements)
- [Installation](#-installation)
- [Quick Start](#-quick-start)
- [Configuration](#-configuration)
    - [Basic Gateway](#basic-gateway-configuration)
    - [Advanced Gateway](#advanced-gateway-configuration)
    - [Authentication Methods](#authentication-methods)
    - [Special Parameters](#special-parameters)
- [Usage](#-usage)
    - [Helper Function](#using-helper-function)
    - [Facade](#using-facade)
    - [Notifications](#using-notifications)
- [Advanced Features](#-advanced-features)
- [Real Provider Examples](#-real-provider-examples)
- [Testing](#-testing)
- [Changelog](#-changelog)
- [Support](#-support)

---

✨ Features
----------

[](#-features)

- ✅ **Universal Compatibility** - Works with any REST API SMS provider
- ✅ **Multiple Gateways** - Configure and switch between multiple SMS providers
- ✅ **Laravel Notifications** - Full integration with Laravel's notification system
- ✅ **Modern Auth** - Support for Bearer tokens, API keys, Basic Auth, and custom headers
- ✅ **Bulk SMS** - Send to multiple recipients in a single call
- ✅ **JSON &amp; Form Data** - Support for both JSON payloads and form-encoded requests
- ✅ **Request Wrapping** - Handle complex API structures with wrapper support
- ✅ **Type Safe** - Built with PHP 8.1+ strict types
- ✅ **Dependency Injection** - Modern Laravel service container integration
- ✅ **Comprehensive Logging** - Built-in request/response logging
- ✅ **Easy Testing** - Mock-friendly architecture

---

📌 Requirements
--------------

[](#-requirements)

- PHP 8.1 or higher
- Laravel 10.x, 11.x, or 12.x
- Guzzle HTTP Client 7.8+

---

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

[](#-installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require gr8shivam/laravel-sms-api
```

### 2. Publish Configuration

[](#2-publish-configuration)

```
php artisan vendor:publish --provider="Gr8Shivam\SmsApi\SmsApiServiceProvider"
```

This creates `config/sms-api.php` in your application.

### 3. Configure Your Gateway

[](#3-configure-your-gateway)

Edit `config/sms-api.php` and add your SMS provider credentials (see [Configuration](#-configuration) below).

---

🚀 Quick Start
-------------

[](#-quick-start)

### Send Your First SMS

[](#send-your-first-sms)

```
use Gr8Shivam\SmsApi\SmsApiFacade as SmsApi;

// Simple usage
SmsApi::sendMessage("9876543210", "Hello from Laravel!");

// Or using helper
smsapi("9876543210", "Hello from Laravel!");
```

### Send to Multiple Recipients

[](#send-to-multiple-recipients)

```
SmsApi::sendMessage(["9876543210", "9876543211"], "Hello everyone!");
```

### Get Response

[](#get-response)

```
$response = SmsApi::sendMessage("9876543210", "Hello!")
    ->response();

$statusCode = SmsApi::sendMessage("9876543210", "Hello!")
    ->getResponseCode();

$isSuccess = SmsApi::sendMessage("9876543210", "Hello!")
    ->isSuccessful(); // Returns true for 2xx status codes
```

---

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

[](#️-configuration)

Open `config/sms-api.php` after publishing.

### Global Settings

[](#global-settings)

```
return [
    // Default country code (added to numbers automatically)
    'country_code' => env('SMS_API_COUNTRY_CODE', '91'),

    // Default gateway to use
    'default' => env('SMS_API_DEFAULT_GATEWAY', 'your_gateway'),

    // HTTP client timeouts
    'timeout' => env('SMS_API_TIMEOUT', 30),
    'connect_timeout' => env('SMS_API_CONNECT_TIMEOUT', 10),

    // Optional message validation
    'validation' => [
        'enabled' => env('SMS_API_VALIDATION_ENABLED', false),
        'max_length' => env('SMS_API_MAX_LENGTH', 1000),
    ],
];
```

---

### Basic Gateway Configuration

[](#basic-gateway-configuration)

For simple GET/POST requests:

```
'your_gateway' => [
    'method' => 'POST',  // GET, POST, PUT, PATCH, DELETE
    'url' => 'https://api.smsgateway.com/send',
    'params' => [
        'send_to_param_name' => 'mobile',    // Your provider's "to" param name
        'msg_param_name' => 'message',       // Your provider's "message" param name
        'others' => [
            'api_key' => env('SMS_GATEWAY_KEY'),
            'sender_id' => env('SMS_SENDER_ID'),
        ],
    ],
    'headers' => [
        'Accept' => 'application/json',
    ],
    'add_code' => true,  // Automatically add country code
],
```

---

### Advanced Gateway Configuration

[](#advanced-gateway-configuration)

For JSON requests with complex structures:

```
'advanced_gateway' => [
    'method' => 'POST',
    'url' => 'https://api.provider.com/v2/send',
    'params' => [
        'send_to_param_name' => 'recipient',
        'msg_param_name' => 'text',
        'others' => [
            'priority' => 'high',
            'ttl' => 3600,
        ],
    ],
    'headers' => [
        'Authorization' => 'Bearer ' . env('SMS_API_TOKEN'),
        'Content-Type' => 'application/json',
    ],
    'json' => true,              // Send as JSON payload
    'jsonToArray' => true,       // Send single number as array: ["9876543210"]
    'wrapper' => 'data',         // Wrap payload in {"data": {...}}
    'wrapperParams' => [
        'campaign_id' => 'welcome_sms',
    ],
    'add_code' => true,
],
```

**Result payload example:**

```
{
  "data": [
    {
      "recipient": ["919876543210"],
      "text": "Your message",
      "campaign_id": "welcome_sms"
    }
  ],
  "priority": "high",
  "ttl": 3600
}
```

---

### Authentication Methods

[](#authentication-methods)

#### 1. Bearer Token (Most Modern APIs)

[](#1-bearer-token-most-modern-apis)

```
'gateway' => [
    'headers' => [
        'Authorization' => 'Bearer ' . env('SMS_API_TOKEN'),
    ],
],
```

**In `.env`:**

```
SMS_API_TOKEN=your_bearer_token_here
```

#### 2. API Key in Header

[](#2-api-key-in-header)

```
'gateway' => [
    'headers' => [
        'X-API-Key' => env('SMS_API_KEY'),
    ],
],
```

#### 3. Basic Authentication

[](#3-basic-authentication)

```
'gateway' => [
    'headers' => [
        'Authorization' => 'Basic ' . base64_encode(env('SMS_USERNAME') . ':' . env('SMS_PASSWORD')),
    ],
],
```

#### 4. API Key in Parameters

[](#4-api-key-in-parameters)

```
'gateway' => [
    'params' => [
        'others' => [
            'api_key' => env('SMS_API_KEY'),
        ],
    ],
],
```

---

### Special Parameters

[](#special-parameters)

#### `json` (boolean)

[](#json-boolean)

Send parameters as JSON payload instead of query string or form data.

```
'json' => true,
```

#### `jsonToArray` (boolean)

[](#jsontoarray-boolean)

When `json` is `true`, controls whether a single mobile number is sent as:

- `true`: `["9876543210"]` (array)
- `false`: `"9876543210"` (string)

```
'jsonToArray' => false,
```

#### `wrapper` (string)

[](#wrapper-string)

Wraps the JSON request in a named object. Required by some providers.

```
'wrapper' => 'sms',  // Creates: {"sms": [{...}]}
```

#### `wrapperParams` (array)

[](#wrapperparams-array)

Adds parameters **inside** the wrapper (separate from regular params).

```
'wrapperParams' => [
    'campaign' => 'summer_sale',
    'priority' => 1,
],
```

#### `add_code` (boolean)

[](#add_code-boolean)

Automatically prepend country code to phone numbers.

```
'add_code' => true,  // 9876543210 becomes 919876543210
```

---

📱 Usage
-------

[](#-usage)

### Using Helper Function

[](#using-helper-function)

The `smsapi()` helper provides the most convenient way to send SMS.

#### Basic Usage

[](#basic-usage)

```
// Quick send
smsapi("9876543210", "Welcome to our platform!");

// Or
smsapi()->sendMessage("9876543210", "Welcome!");
```

#### With Extra Parameters

[](#with-extra-parameters)

```
smsapi("9876543210", "Your OTP is 1234", [
    'template_id' => 'OTP_TEMPLATE',
    'priority' => 'high'
]);
```

#### With Custom Headers

[](#with-custom-headers)

```
smsapi("9876543210", "Hello", [], [
    'X-Custom-Header' => 'value',
    'X-Request-ID' => uniqid()
]);
```

#### Using Different Gateway

[](#using-different-gateway)

```
smsapi()->gateway('backup_gateway')
    ->sendMessage("9876543210", "Message via backup gateway");
```

#### Using Different Country Code

[](#using-different-country-code)

```
smsapi()->countryCode('1')  // USA
    ->sendMessage("5551234567", "Hello from USA!");
```

#### Bulk SMS

[](#bulk-sms)

```
$recipients = ["9876543210", "9876543211", "9876543212"];
smsapi($recipients, "Bulk message to all!");
```

#### With Wrapper Parameters

[](#with-wrapper-parameters)

```
smsapi()->addWrapperParams([
        'campaign' => 'newsletter',
        'tracking_id' => '12345'
    ])
    ->sendMessage("9876543210", "Newsletter message");
```

#### Method Chaining

[](#method-chaining)

```
smsapi()
    ->gateway('primary_gateway')
    ->countryCode('91')
    ->addWrapperParams(['campaign' => 'promo'])
    ->sendMessage("9876543210", "Promotional offer!", [
        'template_id' => 'PROMO_123'
    ]);
```

---

### Using Facade

[](#using-facade)

The facade provides the same functionality with explicit imports.

```
use Gr8Shivam\SmsApi\SmsApiFacade as SmsApi;

// Basic usage
SmsApi::sendMessage("9876543210", "Hello!");

// With gateway selection
SmsApi::gateway('gateway_name')
    ->sendMessage("9876543210", "Hello!");

// With country code
SmsApi::countryCode('44')  // UK
    ->sendMessage("7911123456", "Hello from UK!");

// Bulk SMS
SmsApi::sendMessage(
    ["9876543210", "9876543211"],
    "Bulk message"
);

// Get response
$response = SmsApi::sendMessage("9876543210", "Test")
    ->response();

// Get status code
$code = SmsApi::sendMessage("9876543210", "Test")
    ->getResponseCode();

// Check success
$success = SmsApi::sendMessage("9876543210", "Test")
    ->isSuccessful();
```

---

### Using Notifications

[](#using-notifications)

Laravel SMS API integrates seamlessly with Laravel's notification system.

#### Step 1: Add Route to Your Model

[](#step-1-add-route-to-your-model)

In your `User` model (or any Notifiable model):

```
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
{
    use Notifiable;

    /**
     * Route notifications for SMS API channel
     */
    public function routeNotificationForSmsApi()
    {
        return $this->phone;  // Return the phone number column
    }
}
```

#### Step 2: Create Notification

[](#step-2-create-notification)

```
php artisan make:notification WelcomeNotification
```

```
namespace App\Notifications;

use Illuminate\Notifications\Notification;
use Gr8Shivam\SmsApi\Notifications\SmsApiChannel;
use Gr8Shivam\SmsApi\Notifications\SmsApiMessage;

class WelcomeNotification extends Notification
{
    public function via($notifiable)
    {
        return [SmsApiChannel::class];
    }

    public function toSmsApi($notifiable)
    {
        return (new SmsApiMessage)
            ->content("Welcome {$notifiable->name}!");
    }
}
```

#### Step 3: Send Notification

[](#step-3-send-notification)

```
$user = User::find(1);
$user->notify(new WelcomeNotification());
```

#### Advanced Notification Examples

[](#advanced-notification-examples)

**With Parameters:**

```
public function toSmsApi($notifiable)
{
    return (new SmsApiMessage)
        ->content("Your OTP is: {$this->otp}")
        ->params([
            'template_id' => 'OTP_VERIFY',
            'priority' => 'high'
        ]);
}
```

**With Headers:**

```
public function toSmsApi($notifiable)
{
    return (new SmsApiMessage)
        ->content($this->message)
        ->params(['campaign' => 'marketing'])
        ->headers(['X-Campaign-ID' => '12345']);
}
```

**Unicode Message:**

```
public function toSmsApi($notifiable)
{
    return (new SmsApiMessage)
        ->content("नमस्ते! Welcome")
        ->unicode();
}
```

**Using Static Constructor:**

```
public function toSmsApi($notifiable)
{
    return SmsApiMessage::create("Hello {$notifiable->name}!")
        ->addParam('template_id', 'WELCOME_001')
        ->addHeader('X-Priority', 'high');
}
```

**Return String (Shorthand):**

```
public function toSmsApi($notifiable)
{
    return "Welcome to our platform!";  // Automatically converted to SmsApiMessage
}
```

---

🔥 Advanced Features
-------------------

[](#-advanced-features)

### 1. Safe Sending Helper

[](#1-safe-sending-helper)

Use `send_sms()` for operations where you want to catch exceptions:

```
if (send_sms("9876543210", "Hello!")) {
    echo "SMS sent successfully!";
} else {
    echo "SMS failed. Error logged.";
}
```

### 2. Response Handling

[](#2-response-handling)

```
$sms = smsapi()->sendMessage("9876543210", "Hello!");

// Get raw response
$response = $sms->response();

// Get status code
$code = $sms->getResponseCode();

// Check if successful
if ($sms->isSuccessful()) {
    // 2xx status code
}
```

### 3. Message Validation

[](#3-message-validation)

```
$message = new SmsApiMessage("Your message here");

// Get message length
$length = $message->length();

// Check if empty
if ($message->isEmpty()) {
    // Handle empty message
}

// Estimate SMS segments (for cost calculation)
$segments = $message->estimateSegments();  // Returns 1, 2, 3...

// Get preview
$preview = $message->preview(50);  // First 50 characters
```

Enable validation in config:

```
'validation' => [
    'enabled' => true,
    'max_length' => 1000,
],
```

Then validate:

```
try {
    $message->validate();
} catch (\InvalidArgumentException $e) {
    // Handle validation error
}
```

### 4. Dynamic Gateway Selection

[](#4-dynamic-gateway-selection)

```
$gateway = $user->isPremium() ? 'premium_gateway' : 'basic_gateway';

smsapi()->gateway($gateway)
    ->sendMessage($user->phone, "Relevant message");
```

### 5. Environment-based Configuration

[](#5-environment-based-configuration)

```
// .env
SMS_API_DEFAULT_GATEWAY=twilio
SMS_API_COUNTRY_CODE=1
SMS_API_TIMEOUT=60
TWILIO_ACCOUNT_SID=your_sid
TWILIO_AUTH_TOKEN=your_token
TWILIO_FROM_NUMBER=+15551234567
```

### 6. Multiple Recipients Handling

[](#6-multiple-recipients-handling)

```
// Array of numbers
$recipients = User::where('notify_sms', true)
    ->pluck('phone')
    ->toArray();

smsapi($recipients, "Important announcement!");
```

### 7. Logging

[](#7-logging)

All requests and responses are automatically logged using Laravel's logging system:

```
// Check logs/laravel.log for:
// [INFO] SMS Gateway Response Code: 200
// [INFO] SMS Gateway Response Body: {...}
// [ERROR] SMS Gateway Response Code: 400
// [ERROR] SMS Gateway Response Body: {...}
```

---

🌐 Real Provider Examples
------------------------

[](#-real-provider-examples)

### Twilio

[](#twilio)

```
'twilio' => [
    'method' => 'POST',
    'url' => 'https://api.twilio.com/2010-04-01/Accounts/' . env('TWILIO_ACCOUNT_SID') . '/Messages.json',
    'params' => [
        'send_to_param_name' => 'To',
        'msg_param_name' => 'Body',
        'others' => [
            'From' => env('TWILIO_FROM_NUMBER'),
        ],
    ],
    'headers' => [
        'Authorization' => 'Basic ' . base64_encode(env('TWILIO_ACCOUNT_SID') . ':' . env('TWILIO_AUTH_TOKEN')),
    ],
    'add_code' => true,
],
```

**Usage:**

```
smsapi()->gateway('twilio')->sendMessage("5551234567", "Hello from Twilio!");
```

---

### MSG91

[](#msg91)

```
'msg91' => [
    'method' => 'POST',
    'url' => 'https://control.msg91.com/api/v2/sendsms',
    'params' => [
        'send_to_param_name' => 'to',
        'msg_param_name' => 'message',
        'others' => [
            'authkey' => env('MSG91_AUTH_KEY'),
            'sender' => env('MSG91_SENDER_ID'),
            'route' => '4',
            'country' => '91',
        ],
    ],
    'json' => true,
    'wrapper' => 'sms',
    'add_code' => false,
],
```

**Usage:**

```
smsapi()->gateway('msg91')->sendMessage("9876543210", "Hello from MSG91!");
```

---

### AWS SNS (via REST API)

[](#aws-sns-via-rest-api)

```
'aws_sns' => [
    'method' => 'POST',
    'url' => 'https://sns.us-east-1.amazonaws.com/',
    'params' => [
        'send_to_param_name' => 'PhoneNumber',
        'msg_param_name' => 'Message',
        'others' => [
            'Action' => 'Publish',
        ],
    ],
    'headers' => [
        'Authorization' => 'AWS4-HMAC-SHA256 ...',  // Use AWS SDK for proper signing
    ],
    'add_code' => true,
],
```

---

### Nexmo/Vonage

[](#nexmovonage)

```
'nexmo' => [
    'method' => 'POST',
    'url' => 'https://rest.nexmo.com/sms/json',
    'params' => [
        'send_to_param_name' => 'to',
        'msg_param_name' => 'text',
        'others' => [
            'api_key' => env('NEXMO_API_KEY'),
            'api_secret' => env('NEXMO_API_SECRET'),
            'from' => env('NEXMO_FROM'),
        ],
    ],
    'json' => true,
    'add_code' => true,
],
```

---

### Generic Bearer Token API

[](#generic-bearer-token-api)

```
'generic_api' => [
    'method' => 'POST',
    'url' => 'https://api.smsprovider.com/v1/send',
    'params' => [
        'send_to_param_name' => 'to',
        'msg_param_name' => 'message',
        'others' => [
            'sender' => 'YourApp',
        ],
    ],
    'headers' => [
        'Authorization' => 'Bearer ' . env('SMS_BEARER_TOKEN'),
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
    'json' => true,
    'add_code' => true,
],
```

---

🧪 Testing
---------

[](#-testing)

### Running Tests

[](#running-tests)

```
composer test
```

### Writing Tests

[](#writing-tests)

```
use Gr8Shivam\SmsApi\Tests\AbstractTestCase;
use Gr8Shivam\SmsApi\SmsApiFacade as SmsApi;

class MyFeatureTest extends AbstractTestCase
{
    /** @test */
    public function it_sends_sms()
    {
        $this->mockSmsGateway(200, 'Success');

        $response = SmsApi::sendMessage("9876543210", "Test");

        $this->assertEquals(200, $response->getResponseCode());
        $this->assertTrue($response->isSuccessful());
    }
}
```

---

📚 Changelog
-----------

[](#-changelog)

See [CHANGELOG.md](CHANGELOG.md) for version history and breaking changes.

**Latest Version: 4.0.0**

- PHP 8.1+ and Laravel 10+ support
- Modern type hints and strict types
- Bearer token and modern auth support
- Optional message validation
- Enhanced notification system
- Comprehensive test suite

---

🐛 Troubleshooting
-----------------

[](#-troubleshooting)

### SMS Not Sending

[](#sms-not-sending)

1. **Check logs:** `storage/logs/laravel.log`
2. **Verify config:** Ensure gateway credentials are correct
3. **Test manually:**```
    php artisan tinker
    >>> smsapi()->sendMessage("YOUR_NUMBER", "Test")->response();
    ```

### Invalid Response

[](#invalid-response)

```
$sms = smsapi()->sendMessage("9876543210", "Test");
dd([
    'code' => $sms->getResponseCode(),
    'response' => $sms->response(),
    'success' => $sms->isSuccessful()
]);
```

### Configuration Not Loading

[](#configuration-not-loading)

```
php artisan config:clear
php artisan cache:clear
```

---

💡 Best Practices
----------------

[](#-best-practices)

1. **Store credentials in `.env`**, never hardcode
2. **Use queued notifications** for bulk SMS: ```
    $user->notify(new WelcomeNotification());  // Use ShouldQueue trait
    ```
3. **Implement retry logic** for critical messages
4. **Monitor costs** using `estimateSegments()`
5. **Test with mock gateway** before production
6. **Log all SMS** for audit trail

---

🤝 Support
---------

[](#-support)

- **Issues:** [GitHub Issues](https://github.com/gr8shivam/laravel-sms-api/issues)
- **Documentation:** [README.md](https://github.com/gr8shivam/laravel-sms-api)

---

🙏 Credits
---------

[](#-credits)

Developed by [Shivam Agarwal](https://github.com/gr8shivam)

---

📄 License
---------

[](#-license)

MIT License - see [LICENSE](LICENSE) file for details.

---

⭐ Show Your Support
-------------------

[](#-show-your-support)

If this package helps you, please give it a star on [GitHub](https://github.com/gr8shivam/laravel-sms-api)!

---

**Made with ❤️ for the Laravel community**

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance74

Regular maintenance activity

Popularity45

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 87.8% 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 ~253 days

Recently: every ~476 days

Total

14

Last Release

145d ago

Major Versions

1.0.0 → 2.0.02017-09-21

2.0.4 → 3.0.02018-10-11

3.0.6 → v4.0.02026-02-13

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

v4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ae9e2392fbf356942fc9f002d1e84dd3759050e08d60953be6038db8067e481?d=identicon)[gr8shivam](/maintainers/gr8shivam)

---

Top Contributors

[![gr8shivam](https://avatars.githubusercontent.com/u/4292333?v=4)](https://github.com/gr8shivam "gr8shivam (36 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (3 commits)")[![diegotibi](https://avatars.githubusercontent.com/u/25210612?v=4)](https://github.com/diegotibi "diegotibi (1 commits)")[![sharafat](https://avatars.githubusercontent.com/u/810435?v=4)](https://github.com/sharafat "sharafat (1 commits)")

---

Tags

laravellaravel-notificationslaravel-packagelaravel-smslaravel-sms-sendersmssms-apiapilaravelnotificationsmstwiliogatewayvonagenexmoplivomsg91sinch

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gr8shivam-laravel-sms-api/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[simplesoftwareio/simple-sms

Simple-SMS is a package made for Laravel to send/receive (polling/pushing) text messages. Currently supports CalLFire, EZTexting, Email Gateways, FlowRoute, LabsMobile, Mozeo, Nexmo, Plivo, Twilio, and Zenvia

20846.0k5](/packages/simplesoftwareio-simple-sms)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[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.

5226.7k](/packages/simplestats-io-laravel-client)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

205.0k](/packages/ghanem-laravel-smsmisr)

PHPackages © 2026

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