PHPackages                             artisan/laravel-semaphore - 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. artisan/laravel-semaphore

Abandoned → [humans/semaphore-sms](/?search=humans%2Fsemaphore-sms)Library[Mail &amp; Notifications](/categories/mail)

artisan/laravel-semaphore
=========================

Semaphore integration to Laravel's notification layer.

2.0.1(7y ago)21.5kMITPHPPHP &gt;=7.0CI failing

Since Sep 17Pushed 2y ago3 watchersCompare

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

READMEChangelogDependencies (1)Versions (6)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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

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

Total

4

Last Release

2610d ago

Major Versions

1.0.1 → 2.0.02018-08-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a52a3c800262e4c030c9b67498ecfc18288d0258e3a2469c87bfddcb94691be?d=identicon)[artisan](/maintainers/artisan)

---

Top Contributors

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

---

Tags

laravellaravel-supportnotificationsphpsemaphoresmslaravelnotificationsemaphoresms

### Embed Badge

![Health badge](/badges/artisan-laravel-semaphore/health.svg)

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

###  Alternatives

[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)

PHPackages © 2026

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