PHPackages                             andriichuk/laravel-letsads-sms-channel - 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. andriichuk/laravel-letsads-sms-channel

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

andriichuk/laravel-letsads-sms-channel
======================================

Laravel notification channel for LetsAds SMS API

0.1.4(2mo ago)0120[1 PRs](https://github.com/andriichuk/laravel-letsads-sms-channel/pulls)MITPHPPHP ^8.3CI passing

Since Apr 9Pushed 2w agoCompare

[ Source](https://github.com/andriichuk/laravel-letsads-sms-channel)[ Packagist](https://packagist.org/packages/andriichuk/laravel-letsads-sms-channel)[ Docs](https://github.com/andriichuk/laravel-letsads-sms-channel)[ GitHub Sponsors](https://github.com/andriichuk)[ RSS](/packages/andriichuk-laravel-letsads-sms-channel/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (13)Versions (10)Used By (0)

LetsAds SMS Notification Channel for Laravel
============================================

[](#letsads-sms-notification-channel-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/01a6a8ee77de075ef35ece991290781efeca0e2146d85004cb1ea901207acf5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e647269696368756b2f6c61726176656c2d6c6574736164732d736d732d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andriichuk/laravel-letsads-sms-channel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/18b78770c1f6536c45cf6103fa0f951f09332114d0b6c6375acc89e9c35bd5c8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616e647269696368756b2f6c61726176656c2d6c6574736164732d736d732d6368616e6e656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/andriichuk/laravel-letsads-sms-channel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/49b13333c69da09cbd9817420c9d879d70f31e5366dbef2ec6a975e9ba8dda19/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616e647269696368756b2f6c61726176656c2d6c6574736164732d736d732d6368616e6e656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/andriichuk/laravel-letsads-sms-channel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/9a07ab0b432cbf0059d1b6cfe0034ccf8f27ae2bc3c1150f12f6d262a753ab86/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e647269696368756b2f6c61726176656c2d6c6574736164732d736d732d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andriichuk/laravel-letsads-sms-channel)

This package makes it easy to send SMS notifications using [LetsAds](https://letsads.com/api-sms-povidomlennia) from your Laravel application, using Laravel's built-in notification system.

Sending an SMS to a user becomes as simple as using:

```
$user->notify(new Invitation());
```

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

[](#installation)

**Requirements:** PHP 8.3+ and Laravel 11.x, 12.x, or 13.5+.

You can install the package via composer:

```
composer require andriichuk/laravel-letsads-sms-channel
```

The service provider will be auto-discovered by Laravel.

### Setting up the LetsAds service

[](#setting-up-the-letsads-service)

Add your LetsAds SMS credentials to the `services.php` config file:

```
// config/services.php

return [
    // ...

    'letsads' => [
        'login' => env('LETSADS_SMS_LOGIN'),
        'password' => env('LETSADS_SMS_PASSWORD'),
        'from' => env('LETSADS_SMS_FROM'),
        'log_response' => env('LETSADS_SMS_LOG_RESPONSE', false),
    ],
];
```

`login` is the phone number of your LetsAds account (digits, e.g. `380501234567`). `from` is your registered sender name. API access must be enabled in your LetsAds account.

Then add the corresponding environment variables to your `.env`:

```
LETSADS_SMS_LOGIN="380501234567"
LETSADS_SMS_PASSWORD="your-api-password"
LETSADS_SMS_FROM="Your Sender Name"
LETSADS_SMS_LOG_RESPONSE=false
```

Usage
-----

[](#usage)

### Notifiable model

[](#notifiable-model)

In your notifiable model (typically `User`), add the `routeNotificationForLetsAds` method that returns a full mobile number including country code:

```
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
{
    use Notifiable;

    public function routeNotificationForLetsAds(): string
    {
        return $this->phone; // e.g. +380991112233
    }
}
```

### Notification class

[](#notification-class)

Within your notification, add the LetsAds channel to the `via` method and implement `toLetsAds` to build the SMS message:

```
use Andriichuk\LetsAdsSmsChannel\LetsAdsChannel;
use Andriichuk\LetsAdsSmsChannel\Sms;
use Illuminate\Notifications\Notification;

class Invitation extends Notification
{
    public function via($notifiable): array
    {
        return [LetsAdsChannel::class];
    }

    public function toLetsAds($notifiable): Sms
    {
        return new Sms(
            text: 'You have been invited!',
        );
    }
}
```

Now you can send an SMS notification to a user:

```
$user->notify(new Invitation());
```

### Anonymous notifications

[](#anonymous-notifications)

You can also send SMS messages to phone numbers that are not associated with a notifiable model:

```
use Illuminate\Support\Facades\Notification;

Notification::route(LetsAdsChannel::class, '+380991112233')
    ->notify(new Invitation());
```

The channel resolves the recipient phone from the notifiable (via `routeNotificationFor(LetsAdsChannel::class)` or the notifiable’s string form), so your `toLetsAds` method can stay the same and omit the `phone` argument.

### Available message options

[](#available-message-options)

The `Sms` value object supports:

- `text` (string) – the message body.
- `phone` (string, optional) – recipient phone number including country code; if omitted, the channel resolves it from the notifiable.
- `from` (string, optional) – sender name for this message only; if omitted, the default from `config/services.php` is used.

Testing
-------

[](#testing)

Run the test suite with:

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Serhii Andriichuk](https://github.com/andriichuk)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance91

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~2 days

Total

5

Last Release

81d ago

### Community

Maintainers

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

---

Top Contributors

[![andriichuk](https://avatars.githubusercontent.com/u/38154251?v=4)](https://github.com/andriichuk "andriichuk (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelletsadsnotificationsphpsmslaravelnotificationssmsletsadslaravel-letsads-sms-channel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/andriichuk-laravel-letsads-sms-channel/health.svg)

```
[![Health](https://phpackages.com/badges/andriichuk-laravel-letsads-sms-channel/health.svg)](https://phpackages.com/packages/andriichuk-laravel-letsads-sms-channel)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M167](/packages/spatie-laravel-health)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k97](/packages/nativephp-mobile)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24857.5k](/packages/vormkracht10-laravel-mails)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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