PHPackages                             softsmart/smsportal-laravel - 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. softsmart/smsportal-laravel

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

softsmart/smsportal-laravel
===========================

Integration package for SMSPortal into Laravel.

1.1.1(3y ago)011MITPHPPHP ^7.3 || ^8.0

Since Jan 9Pushed 3y agoCompare

[ Source](https://github.com/jsmcm/smsportal-laravel)[ Packagist](https://packagist.org/packages/softsmart/smsportal-laravel)[ Docs](https://github.com/jsmcm/smsportal-laravel)[ RSS](/packages/softsmart-smsportal-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

SMSPortal Laravel Package
=========================

[](#smsportal-laravel-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/309ef397ae181666416f09c6b6fe0a16349ebcd19a209feaf55ec3372af705b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6674736d6172742f736d73706f7274616c2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softsmart/smsportal-laravel)[![Total Downloads](https://camo.githubusercontent.com/80e5291444be679effd1b919c104d6cd4e8503762606065ee11734b430ca3c13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6674736d6172742f736d73706f7274616c2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softsmart/smsportal-laravel)

Third party package created to consume the SMSPortal RESTful API to send SMS's to phone numbers.

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

[](#installation)

You can install the package via composer:

```
composer require softsmart/smsportal-laravel
```

Set these `.env` variables:

```
SMSPORTAL_BASE_URL=https://rest.smsportal.com/v1
SMSPORTAL_CLIENT_ID=
SMSPORTAL_SECRET=
SMSPORTAL_TEST_MODE=true/false
```

You can find your client id &amp; secret in your [SMSPortal control panel](https://cp.smsportal.com/app/#/login).

Usage
-----

[](#usage)

```
// To send a message to a single phone number
SMSPortal::sendMessage('0112223333', 'Hello world!');

// To send a message to a single phone number later
// NOTES: even though replacements is not used for single SMS we still need to
// account for its place (this may change with named parameters in PHP8 in later versions)
// date time is a string in GMT+2 timezone
SMSPortal::sendMessage('0112223333', 'Hello world!', [], "2023-01-12 12:34:33");
```

```
// To send a message to a multiple phone numbers (without text replacements)

$numbers = [
    "0000000000",
    "00000000001",
];

SMSPortal::sendMessage($numbers, 'Hello world!');

// To send a message to a multiple phone numbers later
// NOTES: must account for replacements place (this may change with named parameters in PHP8 in later versions)
// date time is a string in GMT+2 timezone
SMSPortal::sendMessage($numbers, 'Hello world!', [], "2023-01-12 12:34:33");
```

```
// To send a message to a multiple phone numbers (with text replacements)
// Replacements must be an array of array arrays with a key attribute and a value attribute
// Its up to you to determine the key, in this is its ::first_name:: but it could be {first_name}, etc.

$numbers = [
    "0000000000",
    "0000000001",
];

$replacements = [
    // first replacement
    [
        [
            "key"   => "::first_name::",
            "value" => "John"
        ],
        [
            "key"   => "::weather::",
            "value" => "hot",
        ]
    ],
    // second replacement
    [
        [
            "key"   => "::first_name::",
            "value" => "Alice"
        ],
        [
            "key"   => "::weather::",
            "value" => "cold",
        ]
    ],
]

SMSPortal::sendMessage($numbers, 'Hello ::first_name::, today is ::weather::!', $replacements);

// To send a message to a multiple phone numbers later
// date time is a string in GMT+2 timezone
SMSPortal::sendMessage($numbers, 'Hello ::first_name::, today is ::weather::!', $replacements, "2023-01-12 12:34:33");
```

### 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 make use of the issue tracker.

Credits
-------

[](#credits)

- [John McMurray](https://github.com/jsmcm)
- [Jadon Brown](https://github.com/schemeza)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.8% 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 ~1 days

Total

2

Last Release

1219d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7df3cda7ce9bbd09ca5909d57dd20b1906907b7ac8eced4ba44e47b0cf13661a?d=identicon)[softsmart](/maintainers/softsmart)

---

Top Contributors

[![jsmcm](https://avatars.githubusercontent.com/u/15969075?v=4)](https://github.com/jsmcm "jsmcm (11 commits)")[![jadonbrownza](https://avatars.githubusercontent.com/u/7773361?v=4)](https://github.com/jadonbrownza "jadonbrownza (5 commits)")

---

Tags

smsportalsmsportal-laravelsoftsmart

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/softsmart-smsportal-laravel/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[illuminate/cookie

The Illuminate Cookie package.

224.3M122](/packages/illuminate-cookie)

PHPackages © 2026

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