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

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

andriichuk/laravel-atompark-sms-channel
=======================================

This is my package laravel-atompark-sms-channel

0.1.3(1mo ago)030—0%[2 PRs](https://github.com/andriichuk/laravel-atompark-sms-channel/pulls)MITPHPPHP ^8.3CI passing

Since Mar 11Pushed 1mo agoCompare

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

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

AtomPark SMS Notification Channel for Laravel
=============================================

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/960549da9b4dd4bd196d4352dd8db6e541c6493e6cfe6fa4eef402cdd38c9c77/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e647269696368756b2f6c61726176656c2d61746f6d7061726b2d736d732d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andriichuk/laravel-atompark-sms-channel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/adb4d1b9896e87ca7bc1e3237807f77866a720b16094399f4af8157483dc8440/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616e647269696368756b2f6c61726176656c2d61746f6d7061726b2d736d732d6368616e6e656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/andriichuk/laravel-atompark-sms-channel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c39df33228244d940e2e526f9c631886d00acb6e1992096224fca8f38b0ba25c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616e647269696368756b2f6c61726176656c2d61746f6d7061726b2d736d732d6368616e6e656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/andriichuk/laravel-atompark-sms-channel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/196412feeac018ab4f9b89b923ab9a9572257c4df2cc6c0bc8385b7cdcc87d2f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e647269696368756b2f6c61726176656c2d61746f6d7061726b2d736d732d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andriichuk/laravel-atompark-sms-channel)

This package makes it easy to send SMS notifications using [AtomPark](https://www.atompark.com/bulk-sms-service/smsapiv3/) 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-atompark-sms-channel
```

The service provider will be auto-discovered by Laravel.

### Setting up the AtomPark service

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

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

```
// config/services.php

return [
    // ...

    'atompark' => [
        'sms' => [
            'sender' => env('ATOMPARK_SMS_SENDER'),
            'public_key' => env('ATOMPARK_SMS_PUBLIC_KEY'),
            'private_key' => env('ATOMPARK_SMS_PRIVATE_KEY'),
        ],
    ],
];
```

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

```
ATOMPARK_SMS_SENDER="Your Sender Name"
ATOMPARK_SMS_PUBLIC_KEY="your-public-key"
ATOMPARK_SMS_PRIVATE_KEY="your-private-key"
```

Usage
-----

[](#usage)

### Notifiable model

[](#notifiable-model)

In your notifiable model (typically `User`), add the `routeNotificationForAtomPark` 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 routeNotificationForAtomPark(): string
    {
        return $this->phone; // e.g. +380991112233
    }
}
```

### Notification class

[](#notification-class)

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

```
use Andriichuk\AtomParkSmsChannel\AtomParkChannel;
use Andriichuk\AtomParkSmsChannel\Sms;
use Illuminate\Notifications\Notification;

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

    public function toAtomPark($notifiable): Sms
    {
        return new Sms(
            text: 'You have been invited!',
            lifetime: 1, // 0 = maximum, 1/6/12/24 hours
        );
    }
}
```

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(AtomParkChannel::class, '+380991112233')
    ->notify(new Invitation());
```

The channel resolves the recipient phone from the notifiable (via `routeNotificationFor(AtomParkChannel::class)` or the notifiable’s string form), so your `toAtomPark` 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.
- `lifetime` (int) – message lifetime in hours (`0` = maximum, `1`, `6`, `12`, `24`).

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

39

—

LowBetter than 86% of packages

Maintenance89

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

Total

4

Last Release

57d 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 (8 commits)")

---

Tags

laravellaravel-atompark-sms-channel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[vormkracht10/laravel-mails

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

24149.7k](/packages/vormkracht10-laravel-mails)[xammie/mailbook

Laravel Mail Explorer

482458.3k1](/packages/xammie-mailbook)[spatie/laravel-notification-log

Log notifications sent by your Laravel app

207902.8k](/packages/spatie-laravel-notification-log)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41290.2k1](/packages/spatie-laravel-mailcoach-sdk)

PHPackages © 2026

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