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

00[2 PRs](https://github.com/andriichuk/laravel-letsads-sms-channel/pulls)PHPCI passing

Since Apr 4Pushed yesterdayCompare

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

READMEChangelogDependenciesVersions (3)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)

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'),
    ],
];
```

`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"
```

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

21

—

LowBetter than 19% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

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/fc16718c1c07d5bacc569130cc001fdad5a7598d92b9d76f47236426aa09a363?d=identicon)[andriichuk](/maintainers/andriichuk)

---

Top Contributors

[![andriichuk](https://avatars.githubusercontent.com/u/38154251?v=4)](https://github.com/andriichuk "andriichuk (1 commits)")

---

Tags

laravelletsadsnotificationsphpsms

### 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

[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.3M221](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M49](/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)[xammie/mailbook

Laravel Mail Explorer

482458.3k1](/packages/xammie-mailbook)

PHPackages © 2026

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