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

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

gateway/sms
===========

sms gateway

1.8(5y ago)033PHP

Since Nov 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mohammadgh1370/gateway-sms)[ Packagist](https://packagist.org/packages/gateway/sms)[ RSS](/packages/gateway-sms/feed)WikiDiscussions master Synced 1w ago

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

gateway-sms
===========

[](#gateway-sms)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f7fce662d4a31691633aefe780032663d3ee1f002f29a97985a1d02fe50225f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676174657761792f736d732e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6d706f736572)](https://packagist.org/packages/gateway/sms)[![Total Downloads](https://camo.githubusercontent.com/c205357af35806355f738b5080a959c4f686b4c48dd89350e53c2e80bda49f18/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676174657761792f736d732e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c)](https://packagist.org/packages/gateway/sms)

This is a Laravel Package for SMS Gateway Integration. Now Sending SMS is easy.

List of supported gateways:

- log : for test
- [Farazsms](https://farazsms.com)
- Others are under way.

package: Install
----------------

[](#package-install)

Via Composer

```
$ composer require gateway/sms
```

In the config file you can set the default driver to use for all your SMS. But you can also change the driver at runtime.

Choose what gateway you would like to use for your application. Then make that as default driver so that you don't have to specify that everywhere. But, you can also use multiple gateways in a project.

```
'default' => 'log',
```

Then fill the credentials for that gateway in the drivers array.

```
// Eg. for farazsms.
'drivers' => [
    'farazsms' => [
        'url'     => env('FARAZSMS_URL', 'http://rest.ippanel.com'),
        'from'    => env('FARAZSMS_FROM'),
        'api_key' => env('FARAZSMS_API_KEY'),
    ],
    ...
]
```

#### log Configuration:

[](#log-configuration)

log is added by default. You just have to change the creadentials in the `textlocal` driver section.

#### Kavenegar Configuration:

[](#kavenegar-configuration)

In case you want to use Kavenegar. Then you have to pull a composer library first.

```
composer require kavenegar/php
```

Usage
-----

[](#usage)

In your code just use it like this.

```
# On the top of the file.
use Gateway\Sms\Facades\Sms;

...

# In your Controller.
Sms::content("this message")->to(['Number 1', 'Number 2'])->send();
```

😍 Channel Usage
---------------

[](#heart_eyes-channel-usage)

First you have to create your notification using `php artisan make:notification` command. then `sms` can be used as channel like the below:

```
namespace App\Notifications;

use Gateway\Sms\Channels\SmsMessage;use Illuminate\Bus\Queueable;
use Gateway\Sms\Channels\SmsChannel;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;

class VerificationNotification extends Notification
{
    use Queueable;

    /**
     * Get the notification channels.
     *
     * @param  mixed  $notifiable
     * @return array|string
     */
    public function via($notifiable)
    {
        return ['sms'];
    }

    /**
     * Get the repicients and body of the notification.
     *
     * @param  mixed  $notifiable
     * @return Builder
     */
    public function toSms($notifiable)
    {
        # for send message.
        return (new SmsMessage())
            ->via('gateway') # via() is Optional
            ->content('this message')
            ->to('some number')
            ->send();
        # for send by pattern.
        return (new SmsMessage())
            ->via('gateway') # via() is Optional
            ->patternCode('mfgfdm')
            ->patternData(['code' => '45215'])
            ->to('some number')
            ->send();
    }
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~9 days

Recently: every ~14 days

Total

8

Last Release

1945d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ed54ca2cba93e2561d675dc9b8a5dc00613723b81d51b9780415dc64ffe6434?d=identicon)[mohammadgh1992](/maintainers/mohammadgh1992)

---

Top Contributors

[![mohammadgh1370](https://avatars.githubusercontent.com/u/38649905?v=4)](https://github.com/mohammadgh1370 "mohammadgh1370 (17 commits)")

### Embed Badge

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

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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