PHPackages                             riotj/osonsms-gateway - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. riotj/osonsms-gateway

ActiveLibrary[HTTP &amp; Networking](/categories/http)

riotj/osonsms-gateway
=====================

A simple library for sending SMS via OsonSMS API.

1.0.0(2y ago)081MITPHPPHP ^8.1

Since Sep 11Pushed 2y agoCompare

[ Source](https://github.com/Rio-TJ/osonsms-gateway)[ Packagist](https://packagist.org/packages/riotj/osonsms-gateway)[ Docs](https://github.com/Rio-TJ/osonsms)[ RSS](/packages/riotj-osonsms-gateway/feed)WikiDiscussions main Synced 1mo ago

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/5fe65cdb7d987fa32c2559819c6fd15f61fdd0f6920184455ada93965064eb58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f736f6e736d732f736d73676174657761792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rio/osonsms-gateway)[![Build Status](https://camo.githubusercontent.com/7a14ff9497b50387230e689ba9949ffee641b36120ea4f64151749b98582e22a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72696f2f6f736f6e736d732d676174657761792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/rio/osonsms-gateway)[![Quality Score](https://camo.githubusercontent.com/437c65c3f6373e7d26c395c2628a3a459b4e510634bbf2bcaa2de96910ec4bec/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f72696f2f6f736f6e736d732d676174657761792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rio/osonsms-gateway)[![Total Downloads](https://camo.githubusercontent.com/9ce06a5171baf572a9e12e45ca4b3c02fe6235b57057842d06682dd9092d301a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72696f2f6f736f6e736d732d676174657761792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rio/osonsms-gateway)

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

[](#installation)

You can install the package via composer:

```
composer require riotj/osonsms-gateway
```

Usage
-----

[](#usage)

Run following command to publish a migration file:

```
php artisan vendor:publish --provider="OsonSMS\SMSGateway\SMSGatewayServiceProvider" --tag="migrations"
```

Run `php artisan migrate` to create a necessary package table.

To create a config file in order to specify OsonSMS credentials run following command:

```
php artisan vendor:publish --provider="OsonSMS\SMSGateway\SMSGatewayServiceProvider" --tag="config"
```

Open config/smsgateway.php config file and specify following parameters:

- login - Login from OsonSMS
- hash - Hash string
- sender\_name - SMS Sender Name assigned to you

You can send SMS in your Laravel code using folowing code:

```
$txn_id = uniqid();
$result = SMSGateway::Send('xxxxxxxxx', 'This is my test message from Laravel!', $txn_id);
if ($result)
    echo "SMS has been sent succesfully";
else
    echo "When sending SMS an error occurred";

```

You can find the logs of your SMS in the table called `osonsms_log`.

To check your balance use following code `SMSGateway::getBalance()` which returns a decimal number, indicating your balance in Somoni.

If you have any further questions or recommendations, feel free to send us an email at .

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Rasul Safarovitch](https://github.com/safarovitch)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

974d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3691a83a854fbb36fa6c400fb85dd53d4a187882907de5ac89930d12e267ae6?d=identicon)[safarovitch](/maintainers/safarovitch)

---

Top Contributors

[![safarovitch](https://avatars.githubusercontent.com/u/26854499?v=4)](https://github.com/safarovitch "safarovitch (6 commits)")

---

Tags

smsgatewayosonsms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/riotj-osonsms-gateway/health.svg)

```
[![Health](https://phpackages.com/badges/riotj-osonsms-gateway/health.svg)](https://phpackages.com/packages/riotj-osonsms-gateway)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48247.0M384](/packages/php-http-curl-client)

PHPackages © 2026

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