PHPackages                             shabayek/laravel-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. shabayek/laravel-sms

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

shabayek/laravel-sms
====================

Laravel Package For SMS Sending

v1.3.5(3y ago)21.0k1[2 issues](https://github.com/shabayekdes/laravel-sms/issues)MITPHPPHP ^7.3|^7.4|^8.0

Since Apr 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/shabayekdes/laravel-sms)[ Packagist](https://packagist.org/packages/shabayek/laravel-sms)[ Docs](https://github.com/shabayekdes/laravel-sms)[ RSS](/packages/shabayek-laravel-sms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (14)Used By (0)

Laravel SMS
===========

[](#laravel-sms)

[![Github Status](https://github.com/shabayekdes/laravel-sms/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/shabayekdes/laravel-sms/actions) [![Styleci Status](https://camo.githubusercontent.com/936458ac1229d19b2963114b572b6a7fa6a8ee179e29e7d16c05256d76622d31/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3438313939363033332f736869656c643f7374796c653d666c6174266272616e63683d646576656c6f70)](https://github.styleci.io/repos/421966331) [![Packagist version](https://camo.githubusercontent.com/7b95375c2f74c3bec9b34a5d04a497b7e422ab7c0677febf6a00fdc9f21d3b80/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736861626179656b2f6c61726176656c2d736d73)](https://packagist.org/packages/shabayek/laravel-sms) [![mit](https://camo.githubusercontent.com/fdb5a8a2ffcb18ba0787854b5e285d83aac9df56d6a6f590b4da22f75afc0ff9/68747470733a2f2f696d672e736869656c64732e696f2f61706d2f6c2f6c61726176656c)](https://packagist.org/packages/shabayek/laravel-sms) [![Packagist PHP Version Support](https://camo.githubusercontent.com/a112ba96ca9367a0be93663ce9610e6a7cf9da0f187b330ce998b5a0e99271f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f736861626179656b2f6c61726176656c2d736d73)](https://camo.githubusercontent.com/a112ba96ca9367a0be93663ce9610e6a7cf9da0f187b330ce998b5a0e99271f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f736861626179656b2f6c61726176656c2d736d73) [![Packagist Downloads](https://camo.githubusercontent.com/8cb31e82ecca20054ccb9371fab31b1ec2c19fe98785896e50ce385746d12a1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736861626179656b2f6c61726176656c2d736d73)](https://camo.githubusercontent.com/8cb31e82ecca20054ccb9371fab31b1ec2c19fe98785896e50ce385746d12a1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736861626179656b2f6c61726176656c2d736d73)

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

### List of supported gateways:

[](#list-of-supported-gateways)

- [SMS EG](https://www.smseg.com/en)
- [SMS Misr](https://www.sms.com.eg/website)
- [Victory Link](http://www.victorylink.com/)
- [Ooredoo](https://www.ooredoo.com/en/)
- ...

Install
-------

[](#install)

Via Composer

```
composer require shabayek/laravel-sms
```

Usage
-----

[](#usage)

- Publish the config file

```
php artisan vendor:publish --provider="Shabayek\Sms\SmsServiceProvider"
```

- 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' => 'smseg',
```

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

```
SMS_CONNECTION=smseg
SMS_USERNAME=username
SMS_PASSWORD=password
SMS_SENDER_ID=sender
SMS_SERVICE=normal
```

- Send normal sms message

```
use Shabayek\Sms\Facades\Sms;

$sms = Sms::send('0120000000', 'Hello world');
```

- Send otp sms message

> if you set sms service **normal** it's will send via sms message if you set sms service **otp** it's will send via sms message

```
use Shabayek\Sms\Facades\Sms;

$sms = Sms::sendOtp('0120000000');
```

- Verify phone number

```
use Shabayek\Sms\Facades\Sms;

$phone = '09121234567'; // phone number
$otp = '123456'; // otp that you sent to phone
$actualOtp = '123456'; // this is the actual otp that you sent to the user

$verify = Sms::verify($phone, $otp, $actualOtp); // third params is optional with service otp
```

- You can set language for the OTP sms message.

> en: For English ar: For Arabic

```
use Shabayek\Sms\Facades\Sms;

$sms = Sms::setLanguage('ar');
        ->sendOtp('0120000000');
```

### Adding Custom Cache Drivers

[](#adding-custom-cache-drivers)

- Writing The Driver

To create our custom sms driver, we first need to implement the Shabayek\\Sms\\Contracts\\SmsGatewayContract contract. So, a new SMS gateway implementation might look something like this:

```
namespace Shabayek\Sms\Contracts;

class CustomSms implements SmsGatewayContract
{
    public function send($phone, $message): array;

    public function sendOtp($phone, $message = null);

    public function verify(string $phone, int $otp, $actualOtp = null): bool;

    public function balance() { }
}
```

Then, we need to add a new config for our custom sms driver. in sms config within **connections** key

```
'connections' => [
    ...
    'custom' => [
        'driver' => 'custom',
        'username' => 'username',
        'password' => 'password',
        'sender_id' => 'sender',
        'service' => 'normal',
    ],
    ...
],
```

we can finish our custom driver registration by calling the Sms facade's extend method:

```
Sms::extend('custom', function ($app) {
    return new CustomSms(config());
});
```

### Testing

[](#testing)

```
composer test
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you've found a bug regarding security please mail  instead of using the issue tracker.

License
-------

[](#license)

The Laravel SMS Gateway package is open-sourced software licensed under the [MIT license](https://github.com/shabayekdes/laravel-sms/blob/main/LICENSE).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 75.3% 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 ~12 days

Total

11

Last Release

1365d ago

Major Versions

v0.1 → v1.02022-04-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c28cd4d84ed69dab18acb269c8a02d9c7dff89d787d1587d3b8ee6afd934dfa?d=identicon)[shabayekdes](/maintainers/shabayekdes)

---

Top Contributors

[![shabayekdes](https://avatars.githubusercontent.com/u/24995965?v=4)](https://github.com/shabayekdes "shabayekdes (64 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (21 commits)")

---

Tags

laravelsmssms-apilaravelpackagesmssmsmisrsmseg

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)[ipecompany/smsirlaravel

Official Sms.ir Laravel Package

1810.3k1](/packages/ipecompany-smsirlaravel)[prgayman/laravel-sms

Laravel package for sending SMS

124.8k](/packages/prgayman-laravel-sms)

PHPackages © 2026

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