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)082MITPHPPHP ^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 yesterday

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 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

1027d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26854499?v=4)[safarovitch\_jr](/maintainers/safarovitch)[@safarovitch](https://github.com/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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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