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

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

humans/semaphore-sms
====================

A Semaphore SMS client with Laravel integration.

5.0.1(2y ago)26.7k↓71.6%MITPHPPHP &gt;=7.1CI failing

Since Sep 17Pushed 2y ago3 watchersCompare

[ Source](https://github.com/humans/semaphore-php)[ Packagist](https://packagist.org/packages/humans/semaphore-sms)[ RSS](/packages/humans-semaphore-sms/feed)WikiDiscussions main Synced 2d ago

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

Semaphore PHP
=============

[](#semaphore-php)

[![Latest Stable Version](https://camo.githubusercontent.com/c92444970b20a47fd03f7c0e8dd0e8c4012889bff3f57a04e8b26c9b8f7218ee/68747470733a2f2f706f7365722e707567782e6f72672f68756d616e732f73656d6170686f72652d736d732f762f737461626c65)](https://packagist.org/packages/humans/semaphore-sms)[![License](https://camo.githubusercontent.com/030845681e57798da0fb9a2d45d796b5b9639b19286ad3b78840d9f25dc06129/68747470733a2f2f706f7365722e707567782e6f72672f68756d616e732f73656d6170686f72652d736d732f6c6963656e7365)](https://packagist.org/packages/humans/semaphore-sms)

This is a PHP client for the [Semaphore](semaphore.co) SMS service provider with out of the box Laravel integration.

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

[](#installation)

Install via composer:

```
composer require humans/semaphore-sms

```

To start using the library, we'll have to provide the Sempahore API key.

Send a message
--------------

[](#send-a-message)

```
$client = new Client(

  '',

  // If the sender is left blank, SEMAPHORE will be the default sender name.
  '',

);

$client->message()->send('0917xxxxxxx', '');
```

Laravel Integration
-------------------

[](#laravel-integration)

If you're using Laravel, we have some conveniences set up for you. First off, you can set your API key and sender name in your .env file.

```
SEMAPHORE_API_KEY=xxxxxxxx
SEMAPHORE_SENDER_NAME=xxxxxxxx

```

**If you have package discovery disabled,** make sure to register the `Humans\Semaphore\Laravel\ServiceProvider` in your `app.php`.

### Send a message

[](#send-a-message-1)

You can use the `Semaphore` facade provided by the package.

```
use Humans\Semaphore\Laravel\Facades\Semaphore;

Semaphore::message()->send(
    '0917xxxxxxx',
    ''
);
```

### Using Notifications

[](#using-notifications)

If you want to use Laravel's Notification features, this package provides a `SemaphoreChannel` and `SemaphoreMessage` class.

#### Configure your Notifiable

[](#configure-your-notifiable)

In your notifiable class, add a `routeNotificationForSempahore` method and use the database column that holds the mobile number.

```
class User {
    use Notifiable;

    // ...

    public function routeNotificationForSemaphore()
    {
        return $this->mobile_number;
    }
}
```

#### Using Notifications

[](#using-notifications-1)

```
use Humans\Semaphore\Laravel\Contracts\UsesSemaphore;

class Welcome extends Notification implements UsesSemaphore
{
    public function via($notifiable): array
    {
        return [SemaphoreChannel::class];
    }

    public function toSemaphore($notifiable): SemaphoreMessage
    {
        return (new SemaphoreMessage)
            ->message('');
    }
}

User::first()->notify(new Welcome);
```

#### Using on-demand Notifiables

[](#using-on-demand-notifiables)

In the case where you need to send a message but you don't need a model, this package also supports Laravel's on-demand notifications.

```
use Humans\Semaphore\Laravel\SemaphoreChannel;use Illuminate\Support\Facades\Notification;

Notification::route(SemaphoreChannel::class, '0917xxxxxxx')->notify(new Welcome);
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~346 days

Total

14

Last Release

953d ago

Major Versions

1.0.1 → 2.0.02018-08-31

2.0.1 → 3.0.12020-02-07

3.0.2 → 4.0.02020-02-09

4.0.4 → 5.0.02023-11-23

PHP version history (2 changes)1.0.0PHP &gt;=7.0

4.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1993075?v=4)[Jaggy](/maintainers/jaggy)[@jaggy](https://github.com/jaggy)

![](https://avatars.githubusercontent.com/u/21359371?v=4)[Humans](/maintainers/humans)[@humans](https://github.com/humans)

---

Top Contributors

[![jaggy](https://avatars.githubusercontent.com/u/1993075?v=4)](https://github.com/jaggy "jaggy (25 commits)")

---

Tags

laravellaravel-supportnotificationsphpsemaphoresmslaravelnotificationsemaphoresms

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

205.0k](/packages/ghanem-laravel-smsmisr)

PHPackages © 2026

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