PHPackages                             hadhiya/msgowl - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hadhiya/msgowl

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hadhiya/msgowl
==============

The official MsgOwl SMS and OTP wrapper for the Hadhiya ecosystem.

v1.0.0(4mo ago)0136↓92.3%[3 issues](https://github.com/shinanmhd/msgowl/issues)[3 PRs](https://github.com/shinanmhd/msgowl/pulls)MITPHPPHP ^8.4CI passing

Since Feb 19Pushed 3w agoCompare

[ Source](https://github.com/shinanmhd/msgowl)[ Packagist](https://packagist.org/packages/hadhiya/msgowl)[ Docs](https://github.com/hadhiya/msgowl)[ GitHub Sponsors](https://github.com/hadhiya)[ RSS](/packages/hadhiya-msgowl/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependencies (13)Versions (11)Used By (0)

Hadhiya MsgOwl SMS &amp; OTP for Laravel
========================================

[](#hadhiya-msgowl-sms--otp-for-laravel)

A modern, fluent Laravel wrapper for the MsgOwl API. This package simplifies sending SMS and managing OTP (One-Time Password) verification for your applications, following standard PSR-4 conventions.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#a-modern-fluent-laravel-wrapper-for-the-msgowl-api-this-package-simplifies-sending-sms-and-managing-otp-one-time-password-verification-for-your-applications-following-standard-psr-4-conventions)

Features
--------

[](#features)

- **Fluent Message Builder**: Chainable methods for clean, readable code.
- **Dual Domain Support**: Seamlessly switches between standard SMS (`rest.msgowl.com`) and OTP (`otp.msgowl.com`) endpoints.
- **Laravel Notifications**: Integrated support for sending SMS via Laravel's built-in notification system.
- **Dry Run Mode**: Safely test your logic by logging messages locally instead of sending real (paid) SMS.
- **OTP Lifecycle**: Dedicated methods for Sending, Resending, and Verifying OTP codes using secure Key/Secret authentication.

---

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

[](#installation)

You can install the package via composer:

```
composer require hadhiya/msgowl
```

Publish the configuration file to your `config` directory:

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

---

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

[](#configuration)

Add your MsgOwl credentials to your `.env` file. These can be obtained from your [MsgOwl Dashboard](https://www.google.com/search?q=https://msgowl.com/dashboard).

```
# Standard SMS Credentials
MSGOWL_API_KEY=your_access_key
MSGOWL_SENDER_ID=HADHIYA

# Separate credentials for OTP services
MSGOWL_OTP_KEY=your_otp_key
MSGOWL_OTP_SECRET=your_otp_secret
```

---

Usage
-----

[](#usage)

### 1. Sending Standard SMS

[](#1-sending-standard-sms)

You can send messages using the Facade with the fluent builder or a simple array.

```
use Hadhiya\MsgOwl\Facades\MsgOwl;
use Hadhiya\MsgOwl\MsgOwlMessage;

// Using the Fluent Builder (Recommended)
MsgOwl::send(
    MsgOwlMessage::create("Your Hadhiya points have been updated!")
        ->to('9601234567')
        ->sender('HADHIYA')
);

// Quick send using an array
MsgOwl::send([
    'recipients' => '9601234567',
    'body' => 'Welcome to Hadhiya!',
]);
```

### 2. OTP Verification

[](#2-otp-verification)

Ideal for identity verification during NIC or Passport registration flows.

```
// Send an OTP (defaults to 6 digits if not specified)
$response = MsgOwl::sendOtp('9601234567');

// Verify a code provided by the user
$status = MsgOwl::verifyOtp('9601234567', '123456');

if ($status->json('status')) {
    // Identity confirmed!
}
```

### 3. Laravel Notifications

[](#3-laravel-notifications)

Return a `MsgOwlMessage` from your `toMsgOwl` method to send SMS notifications to users.

```
namespace App\Notifications;

use Hadhiya\MsgOwl\Channels\MsgOwlChannel;
use Hadhiya\MsgOwl\MsgOwlMessage;
use Illuminate\Notifications\Notification;

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

    public function toMsgOwl($notifiable)
    {
        return MsgOwlMessage::create("You have received 100 HRF!")
            ->sender('HADHIYA');
    }
}
```

### 4. Development &amp; Testing (Dry Run)

[](#4-development--testing-dry-run)

Use `dryRun()` to write the message data to your `laravel.log` file instead of making a live API request.

```
MsgOwl::send(
    MsgOwlMessage::create("Testing Hadhiya integration...")
        ->to('9601234567')
        ->dryRun()
);
```

---

Credits
-------

[](#credits)

- [Shinan Mohamed](https://www.google.com/search?q=https://github.com/shinanmhd)
- [All Contributors](https://www.google.com/search?q=../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://www.google.com/search?q=LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance86

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d7827e180b20cef669ca6bd97eb4795448263e77ebc1939c179ba196a868d79?d=identicon)[shinanmhd](/maintainers/shinanmhd)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (22 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (22 commits)")[![shinanmhd](https://avatars.githubusercontent.com/u/52172271?v=4)](https://github.com/shinanmhd "shinanmhd (2 commits)")

---

Tags

laravelmsgowlhadhiya

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hadhiya-msgowl/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.3k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M95](/packages/dedoc-scramble)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k28](/packages/codewithdennis-filament-select-tree)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k90](/packages/nativephp-mobile)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k35](/packages/spatie-laravel-passkeys)

PHPackages © 2026

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