PHPackages                             autojunction/laravel-communication-relay-service - 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. autojunction/laravel-communication-relay-service

ActiveLibrary

autojunction/laravel-communication-relay-service
================================================

Laravel Package - Communication Relay Service.

063PHP

Since Nov 6Pushed 6mo agoCompare

[ Source](https://github.com/auto-junction/laravel-communication-relay-service)[ Packagist](https://packagist.org/packages/autojunction/laravel-communication-relay-service)[ RSS](/packages/autojunction-laravel-communication-relay-service/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Communication Relay Service
===================================

[](#laravel-communication-relay-service)

A Laravel package to handle SMS &amp; OTP communication via a central relay service.

---

✅ Features
----------

[](#-features)

- Send OTP messages
- Verify OTP
- Send templated SMS
- Supports hashed OTP type
- Easy integration with environment-based config

---

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

[](#-installation)

```
composer require autojunction/laravel-communication-relay-service

Install Dev Main
composer require autojunction/laravel-communication-relay-service:dev-main
```

---

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

[](#️-environment-configuration)

Add the following variables to your `.env` file:

```
CRS_HOST=
CRS_API_KEY=
CRS_OTP_ENDPOINT=
CRS_VERIFY_OTP_ENDPOINT=
CRS_SMS_ENDPOINT=
CRS_SOURCE=
```

---

🚀 Usage
-------

[](#-usage)

### Import the service

[](#import-the-service)

```
use AshokDevatwal\CommunicationRelay\Services\SmsService;

$smsService = new SmsService();
```

---

### 📩 Send OTP

[](#-send-otp)

```
$mobile = '911234567890';

$response = $smsService->send('OTP', $mobile);
```

---

### ✅ Verify OTP

[](#-verify-otp)

```
$mobile = '911234567890';
$otp = '123456';

$response = $smsService->verifyOtp($mobile, $otp);
```

---

### ✉️ Send SMS (Templated)

[](#️-send-sms-templated)

```
$to = '911234567890';

$options = [
    'identifier' => 'welcome_user', // template name
    'data' => [
        'user' => 'Raj',
        'brand' => 'Mahindra',
        'model' => '575 DI'
    ],
];

$response = $smsService->send('SMS', $to, $options);
```

---

### 🔐 Send Hashed OTP (Optional)

[](#-send-hashed-otp-optional)

```
$options = [
    'hash' => 'asdftdf12345',
];

$response = $smsService->send('OTP', '911234567890', $options);
```

---

📄 Method Reference
------------------

[](#-method-reference)

MethodDescription`send('OTP', $mobile)`Send OTP`send('SMS', $mobile, $options)`Send Template SMS`verifyOtp($mobile, $otp)`Verify OTP---

❗ Notes
-------

[](#-notes)

- Ensure you configure `.env` values correctly
- `$options['data']` must match variables used in your SMS template
- `$options['identifier']` is required for SMS type only

---

👨‍💻 Author
----------

[](#‍-author)

**Ashok Devatwal**

---

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance47

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

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://www.gravatar.com/avatar/94a871009811b327fb90ca8bee30412c6885449d9caf3f00c7ecaf449666b4fc?d=identicon)[ashok-devatwal](/maintainers/ashok-devatwal)

---

Top Contributors

[![ashok-devatwal](https://avatars.githubusercontent.com/u/118818748?v=4)](https://github.com/ashok-devatwal "ashok-devatwal (16 commits)")

### Embed Badge

![Health badge](/badges/autojunction-laravel-communication-relay-service/health.svg)

```
[![Health](https://phpackages.com/badges/autojunction-laravel-communication-relay-service/health.svg)](https://phpackages.com/packages/autojunction-laravel-communication-relay-service)
```

PHPackages © 2026

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