PHPackages                             shekili/msmsms - 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. shekili/msmsms

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

shekili/msmsms
==============

MSM.az SMS Gateway integration for Laravel

v1.0.0(3mo ago)03MITPHPPHP ^8.1

Since Apr 17Pushed 3mo agoCompare

[ Source](https://github.com/shekili/msmsms)[ Packagist](https://packagist.org/packages/shekili/msmsms)[ RSS](/packages/shekili-msmsms/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

Laravel MSM SMS Package
=======================

[](#laravel-msm-sms-package)

[![Latest Version](https://camo.githubusercontent.com/370a3963d5224a2239cf51d18da0aef95bf384f7ea4233614c2449d20525e05c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f5368656b696c692f6d736d736d732e737667)](https://packagist.org/packages/Shekili/msmsms)[![License](https://camo.githubusercontent.com/1e10c10e5f3e225421c96ce07788189761829052214acf908716adf16337342d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5368656b696c692f6d736d736d73)](LICENSE)

**MSM.az** SMS Gateway üçün Laravel inteqrasiyası. HTTP və XML API dəstəyi, balans sorğusu, çatdırılma statusu yoxlaması daxildir.

---

Quraşdırma
----------

[](#quraşdırma)

```
composer require Shekili/msmsms
```

### Config faylını publish edin

[](#config-faylını-publish-edin)

```
php artisan vendor:publish --tag=msm-sms-config
```

### Migration-u işə salın

[](#migration-u-işə-salın)

Migration **avtomatik** yüklənir — əlavə publish lazım deyil:

```
php artisan migrate
```

Və ya faylı öz layihənizə kopyalamaq istəyirsinizsə:

```
php artisan vendor:publish --tag=msm-sms-migrations
php artisan migrate
```

### `.env` faylına əlavə edin

[](#env-faylına-əlavə-edin)

```
MSM_SMS_USERNAME=your_username
MSM_SMS_API_KEY=your_api_key
MSM_SMS_SENDER_NAME=YourName
MSM_SMS_DRIVER=http   # http or xml
```

---

İstifadə
--------

[](#i̇stifadə)

### Tək nömrəyə SMS göndərmək (HTTP API)

[](#tək-nömrəyə-sms-göndərmək-http-api)

```
use Shekili\MsmSms\Facades\MsmSms;

$response = MsmSms::send('994501234567', 'Salam, bu test mesajıdır!');

if ($response->isSuccess()) {
    echo "Mesaj göndərildi. ID: " . $response->messageId;
    echo "Balans: " . $response->balance;
}
```

### Eyni mətni çox nömrəyə göndərmək (XML API)

[](#eyni-mətni-çox-nömrəyə-göndərmək-xml-api)

```
$response = MsmSms::sendToMany(
    ['994501234567', '994701234567', '994551234567'],
    'Bütün istifadəçilərə salam!'
);
```

### Hər nömrəyə fərqli mətn (XML API)

[](#hər-nömrəyə-fərqli-mətn-xml-api)

```
$response = MsmSms::sendBulk([
    ['to' => '994501234567', 'text' => 'Salam Əli!'],
    ['to' => '994701234567', 'text' => 'Salam Aynur!'],
]);
```

### Mesaj statusunu yoxlamaq

[](#mesaj-statusunu-yoxlamaq)

```
$status = MsmSms::checkStatus('526973');

echo $status['msisdn'];  // 994501234567
echo $status['status'];  // 2
echo MsmSms::statusLabel($status['status']); // Delivered
```

### Toplu göndərim statusu (Task ID ilə)

[](#toplu-göndərim-statusu-task-id-ilə)

```
$messages = MsmSms::checkTaskStatus('1141205172211');

foreach ($messages as $msg) {
    echo $msg['msisdn'] . ' → ' . MsmSms::statusLabel($msg['status']);
}
```

### Balans sorğusu

[](#balans-sorğusu)

```
$info = MsmSms::balance();
echo "Balans: " . $info['balance'];
echo "Tarix: "  . $info['date'];
```

---

Status Kodları
--------------

[](#status-kodları)

KodAçıqlama0Pending (növbədə)1Enroute (operatora göndərilib)2Delivered (çatdırılıb)3Expired (vaxtı keçib)5Undeliverable (çatdırıla bilmir)8Rejected (rədd edilib)9ExpiredLocal (24 saatda çatdırılmayıb)---

SMS Logları
-----------

[](#sms-logları)

### Göndərilən SMS-ləri görmək

[](#göndərilən-sms-ləri-görmək)

```
use Shekili\MsmSms\Models\SmsLog;

// Bütün loglar
SmsLog::all();

// Yalnız çatdırılanlar
SmsLog::delivered()->get();

// Uğursuzlar
SmsLog::failed()->get();

// Konkret nömrə
SmsLog::forRecipient('994501234567')->latest()->get();
```

### Polimorfik əlaqə — logu modellə bağlamaq

[](#polimorfik-əlaqə--logu-modellə-bağlamaq)

SMS göndərərkən hansı modelə aid olduğunu qeyd edə bilərsiniz:

```
$user = User::find(1);

MsmSms::send('994501234567', 'Sifarişiniz təsdiqləndi!', $user);
```

Sonra həmin istifadəçinin bütün SMS-lərini çəkmək üçün `HasSmsLogs` trait-i əlavə edin:

```
// App\Models\User.php
use Shekili\MsmSms\Models\SmsLog;

public function smsLogs()
{
    return $this->morphMany(SmsLog::class, 'model');
}

// İstifadəsi:
$user->smsLogs()->delivered()->get();
```

### Status yeniləmək

[](#status-yeniləmək)

```
// checkStatus() avtomatik olaraq log cədvəlini yeniləyir
MsmSms::checkStatus('526973');

// Toplu göndərim statusu
MsmSms::checkTaskStatus('1141205172211');
```

---

```
use Shekili\MsmSms\Exceptions\MsmSmsException;

try {
    $response = MsmSms::send('994501234567', 'Test');
} catch (MsmSmsException $e) {
    echo "Xəta kodu: " . $e->getErrorCode();
    echo "Xəta mətni: " . $e->getErrorText();
}
```

---

Testlər
-------

[](#testlər)

```
composer test
```

---

Lisenziya
---------

[](#lisenziya)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance81

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

98d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59eb348cde2a635c0a96ae3fc7e461ced086d9094ae7491f45f2d6188f0c0bde?d=identicon)[shekili](/maintainers/shekili)

---

Top Contributors

[![shekili](https://avatars.githubusercontent.com/u/104055370?v=4)](https://github.com/shekili "shekili (1 commits)")

---

Tags

laravelnotificationsmsgatewayazerbaijanmsm

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shekili-msmsms/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[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.

5022.6k](/packages/simplestats-io-laravel-client)[gr8shivam/laravel-sms-api

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

10140.7k](/packages/gr8shivam-laravel-sms-api)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k21](/packages/fleetbase-core-api)

PHPackages © 2026

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