PHPackages                             grafstorm/laravel-46elks-notification-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. grafstorm/laravel-46elks-notification-channel

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

grafstorm/laravel-46elks-notification-channel
=============================================

46 Elks Laravel Notification Channel

0.2.0-alpha(5y ago)0182MITPHPPHP ^8.0

Since Mar 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/argia-andreas/laravel-46elks-notification-channel)[ Packagist](https://packagist.org/packages/grafstorm/laravel-46elks-notification-channel)[ Docs](https://github.com/grafstorm/laravel-46elks-notification-channel)[ GitHub Sponsors](https://github.com/grafstorm)[ RSS](/packages/grafstorm-laravel-46elks-notification-channel/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

46 Elks Laravel Notification Channel
====================================

[](#46-elks-laravel-notification-channel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/71517d7a64afc358eb4edc1c456e7d00edfb1b6af134b00638135ee87019674c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772616673746f726d2f6c61726176656c2d3436656c6b732d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grafstorm/laravel-46elks-notification-channel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1eeb5d75d9375a493e682abe1799b264b5915703b072728edcd72efdef43320d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f61726769612d616e64726561732f6c61726176656c2d3436656c6b732d6e6f74696669636174696f6e2d6368616e6e656c2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/argia-andreas/laravel-46elks-notification-channel/actions?query=workflow%3ATests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a537dbf776bd99a1b1ef98b6aebdef49ff5e196256f999af86c7ca112ed16b52/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f61726769612d616e64726561732f6c61726176656c2d3436656c6b732d6e6f74696669636174696f6e2d6368616e6e656c2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/argia-andreas/laravel-46elks-notification-channel/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/813f82cef46e5a15ce573b729e3c922c7b043ff0d3debb019456e426cdaf134e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772616673746f726d2f6c61726176656c2d3436656c6b732d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grafstorm/laravel-46elks-notification-channel)

**Disclaimer: Not a finished package! If you are looking for a finished package to user for 46elks perhaps look at: **

Laravel SMS notification Channel for 46elks.se sms provider.

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

[](#installation)

You can install the package via composer:

```
composer require grafstorm/laravel-46elks-notification-channel
```

Be sure to set User, Password and Sender in your .env file. Sender is limited to a alphaumeric string of maximum 11 characters(\[A-Za-z0-9\]) or a correctly formatted [E.164](https://en.wikipedia.org/wiki/E.164) phonenumber.

```
FORTY_SIX_ELKS_USER=::username::
FORTY_SIX_ELKS_PASS=::password::
FORTY_SIX_ELKS_FROM=::sender::
```

You can publish the config file if you want to override the default settings.

```
return [
    'user' => env('FORTY_SIX_ELKS_USER'),
    'pass' => env('FORTY_SIX_ELKS_PASS'),
    'from' => env('FORTY_SIX_ELKS_FROM', '46ELKS'),
    'base_url' => env('FORTY_SIX_ELKS_BASE_URL', 'https://api.46elks.com/a1/')
];
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Grafstorm\FortySixElksChannel\FortySixElksChannelServiceProvider" --tag="46elks-notification-channel-config"
```

Usage
-----

[](#usage)

Add `Grafstorm\FortySixElksChannel\FortySixElksChannel::class` in the via method in your notification. And be sure to add a `toFortySixElks` method that returns an array with the mobile number and the message.

```
    use Grafstorm\FortySixElksChannel\FortySixElksChannel;
    use Grafstorm\FortySixElksChannel\SmsMessage;

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return [FortySixElksChannel::class];
    }

    /**
     * Get the mail representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return string[]
     */
    public function toFortySixElks($notifiable): SmsMessage
    {
        // Return a SmsMessage. Needs to and message.
        // To needs to be formatted as a [E.164](https://en.wikipedia.org/wiki/E.164) phonenumber. (Eg. +4612345678)
        return (new SmsMessage())
                ->from('developer')
                ->to($notifiable->mobile)
                ->line('Hello World')
                ->line('')
                ->line('Bye world.');
    }
```

### Sending a oneoff text message

[](#sending-a-oneoff-text-message)

You can also use the FortySixElks facade to send a message directly in your application.

```
use Grafstorm\FortySixElksChannel\SmsMessage;
use Grafstorm\FortySixElksChannel\Facades\FortySixElks;

$message = (new SmsMessage())
                ->to('+461')
                ->line('Hello World');

$sms = FortySixElks::create($message)->send();

// Use dryRun() to test sending the message.
$sms = FortySixElks::create($message)->dryRun()->send();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [grafstorm](https://github.com/argia-andreas)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

1870d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55699875c0413ce112742e2c2969ebf20dad20d14578d31bed06316be5a8beec?d=identicon)[grafstorm](/maintainers/grafstorm)

---

Top Contributors

[![argia-andreas](https://avatars.githubusercontent.com/u/9297340?v=4)](https://github.com/argia-andreas "argia-andreas (5 commits)")

---

Tags

grafstormlaravel-46elks-notification-channel

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/grafstorm-laravel-46elks-notification-channel/health.svg)

```
[![Health](https://phpackages.com/badges/grafstorm-laravel-46elks-notification-channel/health.svg)](https://phpackages.com/packages/grafstorm-laravel-46elks-notification-channel)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[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)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)

PHPackages © 2026

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