PHPackages                             class-atlas/laravel-usms - 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. class-atlas/laravel-usms

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

class-atlas/laravel-usms
========================

Laravel package for seamless SMS sending via Ubill API

v1.1.0(11mo ago)74MITPHPPHP ^8.2

Since Jun 1Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/ClassAtlas/laravel-usms)[ Packagist](https://packagist.org/packages/class-atlas/laravel-usms)[ RSS](/packages/class-atlas-laravel-usms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (15)Versions (3)Used By (0)

📦 Laravel Ubill SMS Integration
===============================

[](#-laravel-ubill-sms-integration)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d799181c7d3a4531340333ba5df2104c686ec38511fb9c3efde49506d8ea1ae8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c6173732d61746c61732f6c61726176656c2d75736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/class-atlas/laravel-usms)[![Total Downloads](https://camo.githubusercontent.com/68ef2b0065bbfb408bea2e00e39f8c0010a53fcfd03ecb3f2a157d86f9a6472a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c6173732d61746c61732f6c61726176656c2d75736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/class-atlas/laravel-usms)

This Laravel package provides a simple and elegant integration with [Ubill](https://ubill.ge)'s SMS service, allowing your Laravel application to send text messages directly through Ubill's API.

Whether you're sending authentication codes, notifications, or alerts — this package helps you connect your app with Ubill's reliable SMS infrastructure in minutes.

---

📌 Features
----------

[](#-features)

- 📤 SMS Sending
- 🛰️ Event Dispatching for Sent SMS
- 📬 Delivery Reports
- 💰 Get SMS Balance
- 🏷️ Brand Name Listing
- 📝 Brand Name Registration

---

🧱 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require class-atlas/laravel-usms
```

---

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

[](#️-configuration)

Add the following to your `.env` file:

```
UBILL_API_URL=https://api.ubill.dev
UBILL_SMS_API_KEY=your_api_key
UBILL_SENDING_DISABLED=false
```

---

📤 SMS Sending
-------------

[](#-sms-sending)

### ✅ Direct Send

[](#-direct-send)

You can send a message directly via the `sendSms` method:

```
USms::sendSms(
    brandId: int,
    numbers: array,
    text: string,
    stopList: bool
): SendSmsData;
```

- `brandId`: The ID of the brand name you’re sending from
- `numbers`: Array of recipient phone numbers. Phone number should include country code.
- `text`: The message content
- `stopList`: Whether to apply the stop-list filter (true/false)

---

### 🔔 Using Laravel Notifications

[](#-using-laravel-notifications)

To send SMS through Laravel’s notification system:

1. Implement the `HasUsmsChannel` interface on your Notification class.
2. Define the `toUSms` method:

```
public function toUSms(object $notifiable): MessageData
{
    return MessageData::from([
        'brandId' => 123,
        'numbers' => ['+9955XXXXXXX'],
        'text' => 'Hello from Ubill!',
        'stopList' => false
    ]);
}
```

3. Add the channel to the `via()` method:

```
public function via($notifiable)
{
    return [ClassAtlas\USms\Channels\USmsChannel::class];
}
```

---

### 📡 USmsWasSent Event

[](#-usmswassent-event)

A event, `USmsWasSent`, is now dispatched whenever a notification is sent using the `HasUsmsChannel`.
This event receives a `USmsWasSentData` object containing:

- `notificationId`: Optional identifier that can be defined in your notification class.
- `sendSmsData`: The raw data returned by the Ubill SMS API.

This allows you to track delivery statuses or coordinate actions across multiple notification channels.

**Example:**
If you're using both the `database` and `USms` channels in your notification, defining a shared `notificationId`and pass to MessageData as a 5th parameter `notificationId`, it will allow you to correlate the records and update delivery statuses later based on the event.

---

📬 Delivery Reports
------------------

[](#-delivery-reports)

You can retrieve the delivery status of a sent SMS using its ID:

```
USms::deliveryReport(smsId: int): ReportData;
```

---

💰 Get SMS Balance
-----------------

[](#-get-sms-balance)

To check the remaining balance of your Ubill account:

```
USms::balance(): SmsBalanceData;
```

---

🏷️ Brand Name Listing
---------------------

[](#️-brand-name-listing)

To get a list of all your registered brand names:

```
USms::listBrandName(): BrandNameData;
```

---

📝 Brand Name Registration
-------------------------

[](#-brand-name-registration)

You can register a new brand name using:

```
USms::createBrandName(brandName: string): BrandNameCreateData;
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance51

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~3 days

Total

2

Last Release

346d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/662517d7046f333d56b6a4c15f83f12024cffa82864638fa8651919b772aef16?d=identicon)[kirkita](/maintainers/kirkita)

---

Top Contributors

[![kirkita](https://avatars.githubusercontent.com/u/554355?v=4)](https://github.com/kirkita "kirkita (11 commits)")

---

Tags

laravelnotificationsmsusmsubill

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/class-atlas-laravel-usms/health.svg)

```
[![Health](https://phpackages.com/badges/class-atlas-laravel-usms/health.svg)](https://phpackages.com/packages/class-atlas-laravel-usms)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[wijourdil/ntfy-notification-channel

ntfy.sh Notification Channel for Laravel

229.4k](/packages/wijourdil-ntfy-notification-channel)[redberry/mailbox-for-laravel

This is my package mailbox-for-laravel

169.9k](/packages/redberry-mailbox-for-laravel)[hooman-mirghasemi/laravel-iran-sms

Laravel Sms

241.8k](/packages/hooman-mirghasemi-laravel-iran-sms)

PHPackages © 2026

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