PHPackages                             offline-agency/laravel-aruba-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. offline-agency/laravel-aruba-sms

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

offline-agency/laravel-aruba-sms
================================

Laravel notification channel and API client for Aruba SMS Panel

1.0.1(2mo ago)034↓33.3%MITPHPPHP ^8.4CI passing

Since Feb 20Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/offline-agency/laravel-aruba-sms)[ Packagist](https://packagist.org/packages/offline-agency/laravel-aruba-sms)[ GitHub Sponsors](https://github.com/offline-agency)[ RSS](/packages/offline-agency-laravel-aruba-sms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (3)Used By (0)

Laravel Aruba SMS
=================

[](#laravel-aruba-sms)

[![Latest Version on Packagist](https://camo.githubusercontent.com/83a59af3b7c8d090d6172e44e77ab1a9ca6839574a5ee9ec4cab29d3a655bff9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f66666c696e652d6167656e63792f6c61726176656c2d61727562612d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/offline-agency/laravel-aruba-sms)[![Tests](https://camo.githubusercontent.com/88bb2a72c2823427c5e29dcf33813bb46c2fbffd7043ad111b9744b4a453d5fe/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f66666c696e652d6167656e63792f6c61726176656c2d61727562612d736d732f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/offline-agency/laravel-aruba-sms/actions/workflows/ci.yml)[![PHPStan](https://camo.githubusercontent.com/79ccd43815a7df7150f9d33e770b3c3dce3cb8ab6dfe9bce0fbd9928de10dbaf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230362d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://phpstan.org/)[![codecov](https://camo.githubusercontent.com/43e7485e36ad5d09b28033d33c50b66d0cad1834c9f1c72203b0b6f257d986ee/68747470733a2f2f636f6465636f762e696f2f67682f6f66666c696e652d6167656e63792f6c61726176656c2d61727562612d736d732f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/offline-agency/laravel-aruba-sms)[![Total Downloads](https://camo.githubusercontent.com/7140c6fdc82a7454c8d5c24880802aa016c4be94cb683f5395c83979e3f0828b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f66666c696e652d6167656e63792f6c61726176656c2d61727562612d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/offline-agency/laravel-aruba-sms)[![License](https://camo.githubusercontent.com/82854d53f10f48f4e80a70dc83be1b5c0e296adc701bf7c0c15a5f03df6c60ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f66666c696e652d6167656e63792f6c61726176656c2d61727562612d736d732e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Laravel notification channel and API client for the [Aruba SMS API Service](https://www.aruba.it/listino-sms.aspx). See the [official API documentation](https://smsdevelopers.aruba.it).

[![Laravel Aruba SMS](https://camo.githubusercontent.com/d1d18a32d0577a934d025cec9502e0e98ab9be691602f04652533dfd20523799/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c2532304172756261253230534d532e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6f66666c696e652d6167656e63792532466c61726176656c2d61727562612d736d73267061747465726e3d617a746563267374796c653d7374796c655f32266465736372697074696f6e3d4c61726176656c2b6e6f74696669636174696f6e2b6368616e6e656c2b616e642b4150492b636c69656e742b666f722b7468652b41727562612b534d532b4150492b53657276696365266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/d1d18a32d0577a934d025cec9502e0e98ab9be691602f04652533dfd20523799/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c2532304172756261253230534d532e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6f66666c696e652d6167656e63792532466c61726176656c2d61727562612d736d73267061747465726e3d617a746563267374796c653d7374796c655f32266465736372697074696f6e3d4c61726176656c2b6e6f74696669636174696f6e2b6368616e6e656c2b616e642b4150492b636c69656e742b666f722b7468652b41727562612b534d532b4150492b53657276696365266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

Requirements
------------

[](#requirements)

- PHP ^8.4
- Laravel ^12.0

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

[](#installation)

### From Packagist (when published)

[](#from-packagist-when-published)

```
composer require offline-agency/laravel-aruba-sms
```

### Local development (path repository)

[](#local-development-path-repository)

Add to your project's `composer.json`:

```
{
    "repositories": [
        {
            "type": "path",
            "url": "packages/offline-agency/laravel-aruba-sms",
            "options": {
                "symlink": true
            }
        }
    ]
}
```

Then:

```
composer require offline-agency/laravel-aruba-sms
```

### Publish config

[](#publish-config)

```
php artisan vendor:publish --tag=aruba-sms-config
```

Configuration
-------------

[](#configuration)

Copy `.env.example` or add these to your `.env`:

```
# Required
ARUBA_SMS_ID=your_username
ARUBA_SMS_PASSWORD=your_password

# Optional
ARUBA_SMS_SENDER=YourBrand              # Default: YourBrand
ARUBA_SMS_SANDBOX=true                  # Default: false (set true for dev/test)
ARUBA_SMS_MINIMUM_SMS=50                # Low credit threshold
ARUBA_SMS_LOW_CREDIT_RECIPIENTS=admin@example.com,dev@example.com
```

VariableDescriptionDefault`ARUBA_SMS_ID`Aruba SMS Panel username(required)`ARUBA_SMS_PASSWORD`Aruba SMS Panel password(required)`ARUBA_SMS_BASE_URL`API base URL`https://smspanel.aruba.it/API/v1.0/REST/``ARUBA_SMS_SENDER`Sender name on recipient's device`YourBrand``ARUBA_SMS_MESSAGE_TYPE`SMS type`N` (Normal)`ARUBA_SMS_SANDBOX`Log instead of sending`false``ARUBA_SMS_MINIMUM_SMS`Low credit alert threshold`50``ARUBA_SMS_LOW_CREDIT_RECIPIENTS`Comma-separated admin emails(empty)Usage
-----

[](#usage)

### Via Notification Channel

[](#via-notification-channel)

Create a notification that uses the `aruba-sms` channel:

```
use Illuminate\Notifications\Notification;
use OfflineAgency\ArubaSms\ArubaSmsMessage;

class OrderShippedNotification extends Notification
{
    public function via($notifiable): array
    {
        return ['aruba-sms'];
    }

    public function toArubaSms($notifiable): ArubaSmsMessage
    {
        return (new ArubaSmsMessage())
            ->content("Your order #{$this->order->id} has been shipped")
            ->to($notifiable->phone_number);
    }
}
```

### Using the Built-in Generic Notification

[](#using-the-built-in-generic-notification)

```
use OfflineAgency\ArubaSms\Notifications\SendSmsNotification;
use Illuminate\Support\Facades\Notification;

// Send to an on-demand notifiable (no User model needed)
Notification::route('aruba-sms', null)
    ->notify(new SendSmsNotification('Your message', '+393331234567'));

// Or send via a notifiable model
$user->notify(new SendSmsNotification('Your message', '+393331234567'));
```

### Direct Client Usage

[](#direct-client-usage)

```
use OfflineAgency\ArubaSms\ArubaSmsClient;
use OfflineAgency\ArubaSms\ArubaSmsMessage;

$client = app(ArubaSmsClient::class);
$message = new ArubaSmsMessage('Hello!', '+393331234567');
$response = $client->sendMessage($message);
```

### Via Facade

[](#via-facade)

```
use OfflineAgency\ArubaSms\Facades\ArubaSms;
use OfflineAgency\ArubaSms\ArubaSmsMessage;

// Send a message
$message = new ArubaSmsMessage('Hello!', '+393331234567');
ArubaSms::sendMessage($message);

// Check remaining credits
$response = ArubaSms::checkSmsStatus();

// Get sending history
$response = ArubaSms::getSmsHistory('20260101000001');
```

### Backward Compatibility (Legacy Pattern)

[](#backward-compatibility-legacy-pattern)

Notifications with public `$message`, `$recipient`, `$message_type` properties work without implementing `toArubaSms()`:

```
class LegacyNotification extends Notification
{
    public string $message = 'Hello';
    public string $recipient = '+393331234567';
    public string $message_type = 'N';

    public function via($notifiable): array
    {
        return ['aruba-sms'];
    }
}
```

Artisan Commands
----------------

[](#artisan-commands)

### `aruba:sms`

[](#arubasms)

Manage the Aruba SMS Panel from the command line:

```
# Check remaining SMS credits
php artisan aruba:sms status

# View sending history
php artisan aruba:sms history --from=20260101000001 --to=20260201000001

# View history for a specific recipient
php artisan aruba:sms recipient-history --recipient=+393331234567 --from=20260101000001

# Send a test SMS
php artisan aruba:sms notification --phoneNumber=+393331234567

# Get raw remaining credit count (for scripting)
php artisan aruba:sms remaining-credit-raw
```

### `aruba:check-remaining-sms`

[](#arubacheck-remaining-sms)

Check remaining credits and send email alerts if below threshold:

```
php artisan aruba:check-remaining-sms
```

Configure alert recipients via `ARUBA_SMS_LOW_CREDIT_RECIPIENTS` env variable.

Phone Number Formatting
-----------------------

[](#phone-number-formatting)

The package provides a `PhoneNumberFormatter` utility for Italian phone numbers:

```
use OfflineAgency\ArubaSms\Support\PhoneNumberFormatter;

// Add +39 prefix and strip spaces
PhoneNumberFormatter::format('333 123 4567');    // '+393331234567'
PhoneNumberFormatter::format('+393331234567');   // '+393331234567' (unchanged)
PhoneNumberFormatter::format('+447911123456');   // '+447911123456' (non-IT preserved)

// Strip spaces only
PhoneNumberFormatter::stripSpaces('+39 333 123 4567'); // '+393331234567'
```

Sandbox Mode
------------

[](#sandbox-mode)

When `ARUBA_SMS_SANDBOX=true`, SMS messages are logged to the Laravel log instead of being sent to the Aruba API. This is useful for development and testing:

```
[2026-02-19 10:30:00] local.INFO: *** Aruba SMS DEBUG ***
[2026-02-19 10:30:00] local.INFO: Notification sent successfully!
[2026-02-19 10:30:00] local.INFO: Recipient: +393331234567
[2026-02-19 10:30:00] local.INFO: Message: Your code is 123456
[2026-02-19 10:30:00] local.INFO: Message Type: N
[2026-02-19 10:30:00] local.INFO: *** *** ***

```

Testing
-------

[](#testing)

```
composer test              # Run tests
composer test:coverage     # Run with coverage (100% minimum)
composer analyse           # PHPStan level 6
composer format            # Fix code style (Pint)
composer format:check      # Check code style without fixing
```

All tests use Pest with `Http::fake()` and never call the real Aruba API.

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance84

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% 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 ~0 days

Total

2

Last Release

81d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/33f8b76656d71bddf83e5924863f37dea04f3f89196e7fb9cf25e30c3ee27093?d=identicon)[offlineagency](/maintainers/offlineagency)

---

Top Contributors

[![Giacomo92](https://avatars.githubusercontent.com/u/11694429?v=4)](https://github.com/Giacomo92 "Giacomo92 (11 commits)")[![francescovarotto](https://avatars.githubusercontent.com/u/86966923?v=4)](https://github.com/francescovarotto "francescovarotto (2 commits)")

---

Tags

laravelsmsitalynotification-channelaruba

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/offline-agency-laravel-aruba-sms/health.svg)

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

###  Alternatives

[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[tzsk/sms

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

320244.3k6](/packages/tzsk-sms)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)[hooman-mirghasemi/laravel-iran-sms

Laravel Sms

241.8k](/packages/hooman-mirghasemi-laravel-iran-sms)

PHPackages © 2026

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