PHPackages                             husam-tariq/filamentsmssender - 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. husam-tariq/filamentsmssender

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

husam-tariq/filamentsmssender
=============================

A powerful FilamentPHP v3 plugin designed to simplify sending SMS messages and implementing One-Time Password (OTP) verification within your Laravel applications. This plugin provides a flexible custom HTTP request builder, allowing seamless integration with virtually any SMS gateway API without writing custom code for each provider.

v1.0.2(1y ago)11[3 PRs](https://github.com/husam-tariq/FilamentSmsSender/pulls)MITPHPPHP ^8.1CI passing

Since Jun 20Pushed 1mo agoCompare

[ Source](https://github.com/husam-tariq/FilamentSmsSender)[ Packagist](https://packagist.org/packages/husam-tariq/filamentsmssender)[ Docs](https://github.com/husam-tariq/filamentsmssender)[ GitHub Sponsors](https://github.com/husam-tariq)[ RSS](/packages/husam-tariq-filamentsmssender/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (10)Versions (9)Used By (0)

FilamentPHP SMS Sender Plugin
=============================

[](#filamentphp-sms-sender-plugin)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cbbe3306542e2c5143134225f5b689853434977dfbd73d479d373a4c8b73ad23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f687573616d2d74617269712f66696c616d656e74736d7373656e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/husam-tariq/filamentsmssender)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c54750eb2c482a85b38a97a28c58cb26492304fc68ed5e64becc6108a60ed801/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f687573616d2d74617269712f66696c616d656e74736d7373656e6465722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/husam-tariq/filamentsmssender/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ca4316d8244c4f7e35b4d6e637e9fb4d569dcb52ea1b7cce48f5bc20f7de065f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f687573616d2d74617269712f66696c616d656e74736d7373656e6465722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/husam-tariq/filamentsmssender/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/81039ce43dfbdfa0fb776f046079b7771664b003c867c1a388fe1f92f0c2361d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f687573616d2d74617269712f66696c616d656e74736d7373656e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/husam-tariq/filamentsmssender)

A powerful FilamentPHP v3 plugin for sending SMS messages and implementing One-Time Password (OTP) verification in your Laravel applications. This plugin provides a flexible custom HTTP request builder that allows seamless integration with virtually any SMS gateway API without writing custom code for each provider.

Features
--------

[](#features)

🚀 **Custom HTTP Request Builder** - Configure any SMS API without code 📱 **OTP Verification System** - Complete OTP generation, sending, and verification ⚙️ **Filament Admin Interface** - Manage SMS providers and test gateways in real-time 🔒 **Rate Limiting** - Built-in protection against OTP abuse 🎯 **Multiple Identifiers** - Support for different OTP contexts (registration, password reset, etc.) 📊 **Comprehensive Logging** - Detailed logs for debugging and monitoring 🧪 **Testing Tools** - Artisan commands and admin panel testing features 🎨 **Livewire Components** - Ready-to-use OTP verification components

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

[](#installation)

Install the package via composer:

```
composer require husam-tariq/filamentsmssender
```

Publish and run the migrations:

```
php artisan vendor:publish --tag="filamentsmssender-migrations"
php artisan migrate
```

Optionally, publish the config file:

```
php artisan vendor:publish --tag="filamentsmssender-config"
```

Plugin Registration
-------------------

[](#plugin-registration)

Register the plugin in your Filament panel provider:

```
use HusamTariq\FilamentSmsSender\FilamentSmsSenderPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            FilamentSmsSenderPlugin::make(),
        ]);
}
```

Configuration
-------------

[](#configuration)

### Admin Panel Configuration

[](#admin-panel-configuration)

1. Navigate to **SMS Providers** in your Filament admin panel
2. Add and configure your SMS providers:
    - **Gateway Settings**: Set API endpoint, method, parameters, and headers
    - **OTP Settings**: Configure OTP length, expiry, and rate limiting

### Example Configuration

[](#example-configuration)

Here's an example configuration for a typical SMS API:

**Request Parameters:**

```
Key: api_key, Value: your-api-key-here
Key: to, Value: {{ recipient }}
Key: message, Value: {{ message }}
Key: from, Value: YourAppName

```

**Request Headers:**

```
Key: Authorization, Value: Bearer your-token-here
Key: Content-Type, Value: application/x-www-form-urlencoded

```

Usage
-----

[](#usage)

### Basic SMS Sending

[](#basic-sms-sending)

```
use HusamTariq\FilamentSmsSender\Facades\FilamentSmsSender;
use HusamTariq\FilamentSmsSender\Services\SmsService;

// Using the facade
$success = FilamentSmsSender::send('+1234567890', 'Hello, World!');

// Using the service directly
$smsService = app(SmsService::class);
$success = $smsService->send('+1234567890', 'Hello, World!');
```

### OTP Functionality

[](#otp-functionality)

#### Sending an OTP

[](#sending-an-otp)

```
use HusamTariq\FilamentSmsSender\Services\SmsService;

$smsService = app(SmsService::class);

// Send OTP for user registration
$otpCode = $smsService->sendOtp('+1234567890', 'user_registration');

if ($otpCode) {
    // OTP sent successfully
    // Store the phone number in session for verification
    session(['pending_verification_phone' => '+1234567890']);
} else {
    // Failed to send OTP (rate limited or configuration error)
}
```

#### Verifying an OTP

[](#verifying-an-otp)

```
$isValid = $smsService->verifyOtp(
    '+1234567890',          // recipient
    '123456',               // OTP code
    'user_registration'     // identifier (optional)
);

if ($isValid) {
    // OTP is valid and has been marked as used
    // Complete the user registration process
} else {
    // OTP is invalid, expired, or already used
}
```

### Using the Livewire Component

[](#using-the-livewire-component)

Include the OTP verification component in your Blade views:

```
@livewire('otp-verification')
```

You can listen for the `otp-verified` event:

```
document.addEventListener('livewire:load', function () {
    Livewire.on('otp-verified', (data) => {
        console.log('OTP verified for:', data.recipient);
        // Handle successful verification
    });
});
```

Artisan Commands
----------------

[](#artisan-commands)

The plugin provides several Artisan commands for testing and management:

### Send SMS

[](#send-sms)

```
# Send a test SMS
php artisan sms:send "+1234567890" "Test message"

# Send in test mode
php artisan sms:send "+1234567890" "Test message" --test
```

### Send OTP

[](#send-otp)

```
# Send an OTP
php artisan sms:send-otp "+1234567890"

# Send OTP with identifier
php artisan sms:send-otp "+1234567890" --identifier="test"
```

### Verify OTP

[](#verify-otp)

```
# Verify an OTP
php artisan sms:verify-otp "+1234567890" "123456"

# Verify OTP with identifier
php artisan sms:verify-otp "+1234567890" "123456" --identifier="test"
```

SMS Gateway Integration Examples
--------------------------------

[](#sms-gateway-integration-examples)

### Twilio

[](#twilio)

```
Method: POST
Endpoint: https://api.twilio.com/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Messages.json

Parameters:
- From: +1234567890
- To: {{ recipient }}
- Body: {{ message }}

Headers:
- Authorization: Basic [base64_encoded_credentials]

```

### Nexmo/Vonage

[](#nexmovonage)

```
Method: POST
Endpoint: https://rest.nexmo.com/sms/json

Parameters:
- api_key: your_api_key
- api_secret: your_api_secret
- from: YourApp
- to: {{ recipient }}
- text: {{ message }}

```

### AWS SNS

[](#aws-sns)

```
Method: POST
Endpoint: https://sns.region.amazonaws.com/

Parameters:
- Action: Publish
- PhoneNumber: {{ recipient }}
- Message: {{ message }}

Headers:
- Authorization: AWS4-HMAC-SHA256 Credential=...
- Content-Type: application/x-www-form-urlencoded

```

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

[](#installation-1)

You can install the package via composer:

```
composer require husam-tariq/filamentsmssender
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="filamentsmssender-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filamentsmssender-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filamentsmssender-views"
```

This is the contents of the published config file:

```
return [
];
```

Usage
-----

[](#usage-1)

```
$filamentSmsSender = new HusamTariq\FilamentSmsSender();
echo $filamentSmsSender->echoPhrase('Hello, HusamTariq!');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Hussam Tariq](https://github.com/husam-tariq)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance70

Regular maintenance activity

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.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 ~0 days

Total

2

Last Release

425d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16601695?v=4)[HUSAM TAREQ AL-SHAIBANI](/maintainers/husam-tariq)[@husam-tariq](https://github.com/husam-tariq)

---

Top Contributors

[![husam-tariq](https://avatars.githubusercontent.com/u/16601695?v=4)](https://github.com/husam-tariq "husam-tariq (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelhusam-tariqfilamentsmssender

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/husam-tariq-filamentsmssender/health.svg)

```
[![Health](https://phpackages.com/badges/husam-tariq-filamentsmssender/health.svg)](https://phpackages.com/packages/husam-tariq-filamentsmssender)
```

###  Alternatives

[backstage/mails

View logged mails and events in a beautiful Filament UI.

16429.7k](/packages/backstage-mails)[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

316.8k2](/packages/finity-labs-fin-mail)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

85240.3k9](/packages/stephenjude-filament-two-factor-authentication)[statikbe/laravel-filament-flexible-content-blocks

The Laravel Filament Flexible Content Blocks package helps you to easily create content in Filament for any model, with predefined or custom blocks, and foreach block an extendable Blade view component.

17927.9k6](/packages/statikbe-laravel-filament-flexible-content-blocks)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6758.2k2](/packages/marcelweidum-filament-passkeys)

PHPackages © 2026

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