PHPackages                             mabehiry/sms - 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. mabehiry/sms

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

mabehiry/sms
============

A package to send SMS using mobily.ws, smsgw.net API

011PHP

Since Nov 17Pushed 5y agoCompare

[ Source](https://github.com/mabehiry/Laravel-SMS)[ Packagist](https://packagist.org/packages/mabehiry/sms)[ RSS](/packages/mabehiry-sms/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Description
===========

[](#description)

A Laraval Package to send sms messages. It supports multiple sms gateways, and easily extendable to support new gateways. The default cofing supports mobily.ws and smsgw.net , and you can easily add any other gateway ( see [Defining new gateways](#gateways) )

Table of Contents
-----------------

[](#table-of-contents)

- [Features and Requirements](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Defining new gateways](#gateways)
- [License](#License)
- [Essentials](#essentials)

Features &amp; Requirements
---------------------------

[](#features--requirements)

- Supports sending messages directly
- Supports sending messages at a certain date/time
- Supports sending messages to multiple numbers at once
- Supports multiple number formats see [Usage](#usage)
- Support using multiple gateways and sender names at the same time.
- Requires an active account with any sms gateway.
- Supports Laravel 5.\*
- cURL
- php &gt;=5.5.0

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

[](#installation)

Install with composer by running `composer require mabehiry/sms:dev-master`
Composer will download and install the package. if you are using Laravel &gt; 5.5 go directly to [Config](#config)**if you are using laravel &lt; 5.4 ONLY**open `config/app.php` and add the service provider and alias as below:

```
'providers' => array(
    ...
    mabehiry\sms\SmsProvider::class,
),
.
.
.
'aliases' => array(
    ...
    'SMS'    => mabehiry\sms\SMS::class,
),

```

### config

[](#config)

Publish the configuration file by running the following Artisan command.

```
$ php artisan vendor:publish --provider="Mabehiry\Sms\SmsProvider"
```

Finally, you need to edit the configuration file at `config/sms.php` with your own gateway info. Also you need to set your default Gateway at the top of the config file.

Usage
-----

[](#usage)

Methods
-------

[](#methods)

### Check Balance

[](#check-balance)

```
SMS::Balance($gatewayName = false);
```

Returns the current balance for the default gateway or for the giving one.

### Send Message / Messages

[](#send-message--messages)

```
SMS::Send($numbers,$message,$dateTime=false,$senderName=false,$gatwayName=false);
```

#### $numbers ( Required )

[](#numbers--required-)

You can pass a single number or array of numbers, see examples below:

- The number can be sent with trailing zeros 00966555555555
- With trailing plus sign +966555555555
- International number without trailing zeros 966555555555
- Even you can use the mobile number without international code - for Saudi Mobile Numbers Only - 0555555555 , the package will take care of formatting the number.

#### $message ( Required )

[](#message--required-)

The message text

#### $dateTime ( Optional )

[](#datetime--optional-)

dateTime format `Y-m-d H:i:s`

#### $senderName ( Optional )

[](#sendername--optional-)

Override default sender name

#### $gatewayName ( Optional )

[](#gatewayname--optional-)

Override default gateway

Examples
--------

[](#examples)

### Send SMS message directly

[](#send-sms-message-directly)

Will send the message directly to the number

```
SMS::Send(966555555555, 'Your Message Here');
```

Returns `true` if the message is sent, `false` if not.

### Send SMS to Multiple Numbers

[](#send-sms-to-multiple-numbers)

Pass an array of numbers instead of a single number to send to all of them

```
$numbers = array('966555555555','966545555555','966565555555');
SMS::Send($numbers, 'Your Message Here');
```

Returns `true` if the message is sent, `false` if not.

### Send SMS message at a certain date/time

[](#send-sms-message-at-a-certain-datetime)

Will send the message in a desired date and time

```
SMS::send(966555555555, 'Your Message Here', $dateTime);
```

##### note

[](#note)

- DateTime format `Y-m-d H:i:s`
- Returns `true` if the message is sent, `false` if not.

### Check the current Balance

[](#check-the-current-balance)

```
SMS::Balance();
```

Returns user's balance.

### Get number of SMS messages a text requires

[](#get-number-of-sms-messages-a-text-requires)

```
SMS::count_messages($text);
```

### Override default sender name

[](#override-default-sender-name)

```
SMS::Send(966555555555, 'Your Message Here', $dateTime=false,'SenderName');
```

Note that the new sender should be registered and activate at mobily.ws website

License
-------

[](#license)

Waqf General Public Licens

Essentials
----------

[](#essentials)

- [Laravel](https://laravel.com)
- Follow me on Twitter [@mobde3](https://twitter.com/mobde3/)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b3422d6b18038257ca9dcb2151b14f4ee34c7ca5d379191f10ba89399bad524?d=identicon)[mabehiry](/maintainers/mabehiry)

---

Top Contributors

[![mabehiry](https://avatars.githubusercontent.com/u/33180080?v=4)](https://github.com/mabehiry "mabehiry (15 commits)")[![AbdullahObaid](https://avatars.githubusercontent.com/u/1207636?v=4)](https://github.com/AbdullahObaid "AbdullahObaid (9 commits)")[![mobde3](https://avatars.githubusercontent.com/u/22984086?v=4)](https://github.com/mobde3 "mobde3 (1 commits)")

### Embed Badge

![Health badge](/badges/mabehiry-sms/health.svg)

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

###  Alternatives

[corviz/br-gpdpl

A lib that provides a series of data anonymizers, compliant with brazilian General Personal Data Protection Law (aka LGPD, in pt-br)

1613.6k](/packages/corviz-br-gpdpl)[afaya/edge-tts

Edge TTS is a PHP package that allows access to the online text-to-speech service used by Microsoft Edge without the need for Microsoft Edge, Windows, or an API key.

151.0k1](/packages/afaya-edge-tts)

PHPackages © 2026

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