PHPackages                             islamv/whatsapp-bridge-settings-plugin - 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. islamv/whatsapp-bridge-settings-plugin

ActiveLibrary

islamv/whatsapp-bridge-settings-plugin
======================================

Reusable WhatsApp bridge and settings plugin for Laravel and Filament.

201PHPCI failing

Since Jul 12Pushed 2w agoCompare

[ Source](https://github.com/islamV/whatsapp-bridge-settings-plugin)[ Packagist](https://packagist.org/packages/islamv/whatsapp-bridge-settings-plugin)[ RSS](/packages/islamv-whatsapp-bridge-settings-plugin/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

WhatsApp Bridge Settings Plugin
===============================

[](#whatsapp-bridge-settings-plugin)

[![Tests](https://github.com/islamV/whatsapp-bridge-settings-plugin/actions/workflows/tests.yml/badge.svg)](https://github.com/islamV/whatsapp-bridge-settings-plugin/actions/workflows/tests.yml)[![Latest Version](https://camo.githubusercontent.com/09d0b376a79bffb41c6fb771b6540141de3aae705c18ce05ad1f545802957f18/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69736c616d762f77686174736170702d6272696467652d73657474696e67732d706c7567696e2e737667)](https://packagist.org/packages/islamv/whatsapp-bridge-settings-plugin)[![License](https://camo.githubusercontent.com/cc8d64731bb5b53e3c6d4eab9799ab79914dbf13b1bfa52d68228dbbb6841c54/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69736c616d562f77686174736170702d6272696467652d73657474696e67732d706c7567696e2e737667)](https://github.com/islamV/whatsapp-bridge-settings-plugin/blob/main/LICENSE)

A reusable WhatsApp bridge and settings plugin for Laravel 13+ and Filament 5. Supports multiple providers: **Bridge**, **Meta WhatsApp Cloud API**, and **Twilio WhatsApp**.

Features
--------

[](#features)

- **Multi-provider support** - Bridge, Meta, Twilio with per-provider configuration
- **Provider selection** - Enum-based provider switching with labels and colors
- **QR Code pairing** - Connect WhatsApp via QR code (Bridge provider)
- **Connection status** - Real-time connection monitoring with polling
- **Test messaging** - Send test messages from the settings page
- **Encrypted tokens** - API tokens encrypted at rest in the database
- **OTP support** - Built-in OTP message templating
- **Bilingual** - Full English and Arabic translations

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

[](#installation)

### 1. Install via Composer

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

```
composer require islamv/whatsapp-bridge-settings-plugin
```

### 2. Publish config

[](#2-publish-config)

```
php artisan vendor:publish --tag=whatsapp-bridge-settings-config
```

### 3. Publish migrations

[](#3-publish-migrations)

```
php artisan vendor:publish --tag=whatsapp-bridge-settings-migrations
```

### 4. Run migrations

[](#4-run-migrations)

```
php artisan migrate
```

### 5. Register the Filament plugin

[](#5-register-the-filament-plugin)

Add the plugin to your Filament PanelProvider:

```
use Islamv\WhatsappBridgeSettingsPlugin\WhatsappBridgeSettingsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(WhatsappBridgeSettingsPlugin::make());
}
```

### 6. Configure WhatsApp credentials

[](#6-configure-whatsapp-credentials)

Open the **WhatsApp Settings** page in your Filament admin panel and configure your preferred provider. If you are using the local sibling service `whatsapp-bridge`, the Bridge provider defaults to `http://127.0.0.1:3000`.

Supported Providers
-------------------

[](#supported-providers)

### WhatsApp Bridge (Self-hosted)

[](#whatsapp-bridge-self-hosted)

Self-hosted WhatsApp Web bridge with QR code pairing support.

```
WHATSAPP_ACTIVE_PROVIDER=bridge
WHATSAPP_BRIDGE_API_BASE_URL=http://127.0.0.1:3000
WHATSAPP_BRIDGE_API_TOKEN=your-token
WHATSAPP_BRIDGE_SENDER=your-sender-id
WHATSAPP_BRIDGE_TIMEOUT=30
```

### Meta WhatsApp Cloud API

[](#meta-whatsapp-cloud-api)

Official Meta WhatsApp Business Cloud API.

```
WHATSAPP_ACTIVE_PROVIDER=meta
WHATSAPP_META_PHONE_NUMBER_ID=your-phone-number-id
WHATSAPP_META_ACCESS_TOKEN=your-access-token
WHATSAPP_META_BUSINESS_ACCOUNT_ID=your-business-account-id
WHATSAPP_META_VERIFY_TOKEN=your-verify-token
WHATSAPP_META_APP_SECRET=your-app-secret
WHATSAPP_META_TIMEOUT=30
```

### Twilio WhatsApp

[](#twilio-whatsapp)

Twilio WhatsApp Messaging API.

```
WHATSAPP_ACTIVE_PROVIDER=twilio
TWILIO_ACCOUNT_SID=your-account-sid
TWILIO_AUTH_TOKEN=your-auth-token
TWILIO_FROM_NUMBER=+1234567890
TWILIO_TIMEOUT=30
```

### Common Settings

[](#common-settings)

```
WHATSAPP_DEFAULT_COUNTRY_CODE=20
WHATSAPP_OTP_ENABLED=true
WHATSAPP_MESSAGES_ENABLED=true
WHATSAPP_TIMEOUT=30
WHATSAPP_OTP_TEMPLATE="Your verification code is: {otp}"
WHATSAPP_LOG_CHANNEL=stack
```

Usage
-----

[](#usage)

### Send a normal message via Facade

[](#send-a-normal-message-via-facade)

```
use Islamv\WhatsappBridgeSettingsPlugin\Facades\WhatsappBridge;

WhatsappBridge::sendMessage('201000000000', 'Hello from Laravel!');
```

### Send an OTP via Facade

[](#send-an-otp-via-facade)

```
use Islamv\WhatsappBridgeSettingsPlugin\Facades\WhatsappBridge;

$otp = '123456';

WhatsappBridge::sendOtp('201000000000', $otp);
```

### Using the Enum

[](#using-the-enum)

```
use Islamv\WhatsappBridgeSettingsPlugin\Enums\WhatsappProvider;

// Get provider label
WhatsappProvider::Bridge->getLabel(); // 'WhatsApp Bridge'

// Get provider color
WhatsappProvider::Meta->getColor(); // 'info'

// Iterate all providers
foreach (WhatsappProvider::cases() as $provider) {
    echo $provider->getLabel();
}
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use Islamv\WhatsappBridgeSettingsPlugin\Contracts\WhatsappProviderInterface;

class SendOrderConfirmation
{
    public function __construct(
        protected WhatsappProviderInterface $whatsapp
    ) {}

    public function handle(): void
    {
        $this->whatsapp->sendMessage(
            '201000000000',
            'Your order is confirmed.'
        );
    }
}
```

### Using the OTP Sender

[](#using-the-otp-sender)

```
use Islamv\WhatsappBridgeSettingsPlugin\Services\WhatsappOtpSender;

class SendVerificationCode
{
    public function __construct(
        protected WhatsappOtpSender $otpSender
    ) {}

    public function handle(): void
    {
        $otp = random_int(100000, 999999);

        $this->otpSender->send('201000000000', (string) $otp);
    }
}
```

Architecture
------------

[](#architecture)

```
src/
├── WhatsappBridgeSettingsPlugin.php          # Filament plugin registration
├── WhatsappBridgeSettingsPluginServiceProvider.php
├── Contracts/
│   └── WhatsappProviderInterface.php         # Provider contract
├── Enums/
│   └── WhatsappProvider.php                  # Provider enum with label and color
├── Concerns/
│   ├── ManagesPhoneNumbers.php               # Phone normalization and masking
│   ├── HasLogChannel.php                     # Log channel resolution
│   └── HandlesOtpMessages.php                # OTP template rendering
├── Services/
│   ├── WhatsappBridge.php                    # Bridge HTTP implementation
│   ├── MetaWhatsapp.php                      # Meta Cloud API implementation
│   ├── TwilioWhatsapp.php                    # Twilio API implementation
│   └── WhatsappOtpSender.php                 # OTP sending service
├── Settings/
│   └── WhatsappSettingsRepository.php        # Multi-provider settings storage
├── Filament/
│   └── Pages/
│       └── WhatsappSettingsPage.php          # Filament settings page
└── Facades/
    └── WhatsappBridge.php                    # Facade

resources/
├── lang/
│   ├── en/messages.php
│   └── ar/messages.php
└── views/

config/
└── whatsapp-bridge-settings.php

database/
└── migrations/
    └── create_whatsapp_bridge_settings_table.php

tests/
├── ConfigTest.php
├── ServiceProviderTest.php
├── ProviderSelectionTest.php
├── WhatsappBridgeTest.php
├── MetaWhatsappTest.php
├── TwilioWhatsappTest.php
├── WhatsappOtpSenderTest.php
└── WhatsappSettingsRepositoryTest.php

```

Testing
-------

[](#testing)

```
vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for recent changes.

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

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.

Security
--------

[](#security)

See [SECURITY.md](SECURITY.md) for security policies and vulnerability reporting.

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE) for more information.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance63

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/119041091?v=4)[islam abdelkarim](/maintainers/islamV)[@islamV](https://github.com/islamV)

---

Top Contributors

[![islamV](https://avatars.githubusercontent.com/u/119041091?v=4)](https://github.com/islamV "islamV (25 commits)")

### Embed Badge

![Health badge](/badges/islamv-whatsapp-bridge-settings-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/islamv-whatsapp-bridge-settings-plugin/health.svg)](https://phpackages.com/packages/islamv-whatsapp-bridge-settings-plugin)
```

PHPackages © 2026

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