PHPackages                             bluesea-cms/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. bluesea-cms/semaphore

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

bluesea-cms/semaphore
=====================

Laravel Plugin for SMS notification using Semaphore

077PHP

Since Oct 14Pushed 3y agoCompare

[ Source](https://github.com/BlueSea-CMS/semaphore-sms)[ Packagist](https://packagist.org/packages/bluesea-cms/semaphore)[ RSS](/packages/bluesea-cms-semaphore/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Semaphore SMS
=============

[](#semaphore-sms)

See Official Semaphore SMS [Documentation here](https://semaphore.co/docs)

#### Installation

[](#installation)

- [Composer](#composer)
- [Configuration](#configuration)

#### Usage

[](#usage)

- [Sending Message](#sending-message)
- [Sending Priority Message](#sending-priority-message)
- [Sending OTP](#sending-otp)
- [Get Message](#get-message)
- [Get All Messages](#get-all-messages)
- [Get Account Information](#get-account-information)
- [Get All Transactions](#get-all-transactions)
- [Get Sender Names](#get-sender-names)
- [Get All users](#get-all-users)

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

[](#installation-1)

### Composer

[](#composer)

Run

```
composer require bluesea-cms/semaphore
```

or insert in `require`

```
"bluesea-cms/semaphore": "dev-master"
```

### Configuration

[](#configuration)

Run to publish the Configuration

```
php artisan semaphore:publish
```

If you want to keep the data on every execution of the method, you might need to publish all the migrations.

To publish all migrations available

```
php artisan semaphore:publish --migration
```

Usage
-----

[](#usage-1)

Use the Semaphore Facade

```
use BlueSea\Semaphore\Facades\Semaphore;
```

### Sending Message

[](#sending-message)

To send a message to a single phone number

```
$messages = Semaphore::send($number, $message);
```

To send a message to a multiple phone number

```
$messages = Semaphore::send([
  $number1,
  $number2,
  $number3,
  ...
], $message);
```

Sending a message, returns an collection of `Message` model.

You can access the the returned message model by:

```
$message = $messages->first();

$message->message_id;
$message->account;
$message->recipient;
$message->message;
$message->code;
$message->sender_name;
```

### Sending Priority Message

[](#sending-priority-message)

Normally messages are processed in the order they are received and during periods of heavy traffic messaging, messages can be delayed. With the `Semaphore::priority()` method, it will bypass the default message queue and sends the message immediately.

\***This service is 2 credits per 160 character SMS.**

This method takes the same parameters as the `send` method, and returns the same collection of `Message` model.

```
Semaphore::priority($number, $message);
```

### Sending OTP

[](#sending-otp)

You can make a custom message included in the OTP sent to the recipient by using the `{otp}` placeholder

For instance using the message: **Your One Time Password is: {otp}. Please use it within 5 minutes.**

will return the message **Your One Time Password is: XXXXXX. Please use it within 5 minutes.**

\***This service is 2 credits per 160 character SMS.**

This method will return a `Message` model instance, and you can then get the `code` by accessing the `code` object from the model

```
$otp = Semaphore::otp($number, $message);

$otp->code;
```

### Get Message

[](#get-message)

To get the Message instance with a specific `message_id`

```
$message = Semaphore::find($messageId);
```

### Get All Messages

[](#get-all-messages)

To get all Messages

```
 $messages = Semaphore::messages();
```

By default, this will only return a maximum of 100 messages per page. Add a parameter to access the messages on certain pages

```
 $messages = Semaphore::messages([
	 'page' => 10,
	 'limit' => 500,		// Default is 100, Maximum of 1000 per page
	 'network' => 'globe', 		// Ex. globe, smart
	 'startDate' => '2020-02-20',	// Format is "YYYY-MM-DD"
	 'endDate', => '2020-12-31',	// Format is "YYYY-MM-DD"
 ]);
```

### Get Account Information

[](#get-account-information)

Access your account's information

```
$account= Semaphore::account();

$account->account_id;

$account->account_name;

$account->status;

$account->credit_balance;
```

### Get All Transactions

[](#get-all-transactions)

Returns a collection of transactions

```
$transactions = Semaphore::transactions();

$params = [
	 'page' => 10,
	 'limit' => 500, 				// Default is 100, Maximum of 1000 per page
];
$transactions = Semaphore::transactions($params);

```

### Get Sender Names

[](#get-sender-names)

Returns a collection of Sender Names associated with your account

```
$senderNames = Semaphore::senderNames();

$params = [
	 'page' => 10,
	 'limit' => 500, 				// Default is 100, Maximum of 1000 per page
];

$senderNames = Semaphore::senderNames($params);
```

### Get All users

[](#get-all-users)

Returns users associated with your account

```
$users = Semaphore::users();

$params = [
	 'page' => 10,
	 'limit' => 500, 				// Default is 100, Maximum of 1000 per page
];
$users = Semaphore::users($params);
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b699416762d51656025e7fa6c342597376932198c2dfe99c754a4a66f9e5158b?d=identicon)[JefteCaro](/maintainers/JefteCaro)

---

Top Contributors

[![JefteCaro](https://avatars.githubusercontent.com/u/23650929?v=4)](https://github.com/JefteCaro "JefteCaro (10 commits)")

### Embed Badge

![Health badge](/badges/bluesea-cms-semaphore/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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