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

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

laravel-notification-channels/46elks
====================================

Laravel notification channel package for 46Elks.

v1.10.12(10mo ago)2114.2k↓68%16[2 issues](https://github.com/laravel-notification-channels/46elks/issues)[3 PRs](https://github.com/laravel-notification-channels/46elks/pulls)MITPHPPHP &gt;=7.0CI failing

Since Sep 23Pushed 10mo ago5 watchersCompare

[ Source](https://github.com/laravel-notification-channels/46elks)[ Packagist](https://packagist.org/packages/laravel-notification-channels/46elks)[ Docs](https://github.com/laravel-notification-channels/46Elks)[ RSS](/packages/laravel-notification-channels-46elks/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (8)Dependencies (6)Versions (12)Used By (0)

46Elks notification channel for Laravel
=======================================

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/141e371dc07991f124a24eb22a28cd25fa035e7fbaa74151af31f2d65d3511ab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f3436456c6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/46Elks)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/73045ae457a642abc139c996e0f30abff0739486baee34b166b7e3104548c0ec/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f3436456c6b732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravel-notification-channels/46Elks)

[![Quality Score](https://camo.githubusercontent.com/75eae6406d2c6e051ae669f2cc22c32f5594087a5a16c603812cdd1acd7d91b7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f3436456c6b732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/46Elks)[![Code Coverage](https://camo.githubusercontent.com/8c38bd3e6401035a8715620801c142e9e27a8f6f9ef5d3c4baa195e4f53cc3a4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f3436456c6b732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/46Elks/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/6b046e21d61aaa73af23f5394f07c05a831b4fc7ee842e24366dc1d25a1bb314/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f3436456c6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/46Elks)

This package makes it easy to send notifications using [46Elks](https://www.46elks.com) with Laravel.

46Elks has a whole bunch of phone oriented services. This package takes care of:

- SMS

With more endpoints to come. Feel free to contribute.

Contents
--------

[](#contents)

- [46Elks notification channel for Laravel](#46elks-notification-channel-for-laravel)
    - [Contents](#contents)
    - [Installation](#installation)
        - [Setting up the 46Elks service](#setting-up-the-46elks-service)
    - [Usage](#usage)
        - [Available mediums](#available-mediums)
            - [SMS](#sms)
        - [Available Message methods for sms](#available-message-methods-for-sms)
            - [MMS](#mms)
        - [Available Message methods](#available-message-methods)
        - [Error handling](#error-handling)
    - [Changelog](#changelog)
    - [Testing](#testing)
    - [Security](#security)
    - [Contributing](#contributing)
    - [Credits](#credits)
    - [License](#license)

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

[](#installation)

```
composer require laravel-notification-channels/46elks

```

### Setting up the 46Elks service

[](#setting-up-the-46elks-service)

add the following to your config/services.php

```
	'46elks' => [
		'username' => env('FORTY_SIX_ELKS_USERNAME'),
		'password' => env('FORTY_SIX_ELKS_PASSWORD'),
	],
```

Also remember to update your .env with correct information:

```
FORTY_SIX_ELKS_USERNAME=
FORTY_SIX_ELKS_PASSWORD=

```

You will find your username and password at

Usage
-----

[](#usage)

To use this channel simply create a notification that has the following content:

```
use NotificationChannels\FortySixElks\FortySixElksChannel;
use NotificationChannels\FortySixElks\FortySixElksSMS;

public function via($notifiable)
{
    return [FortySixElksChannel::class];
}

public function to46Elks($notifiable)
{
    return (new FortySixElksSMS())
        ->line('Testsms')
        ->line('Olle')
        ->to('+46701234567')
        ->from('Emil')
        // ->flash() - Optional
        // ->whenDelivered(URL) - Optional
        // ->dontLog() - Optional
        // ->dry() - Optional
}
```

Another example without the notification implementation.

```
use NotificationChannels\FortySixElks\FortySixElksSMS;

(new FortySixElksSMS())
    ->line('Testsms')
    ->line('Olle')
    ->to('+46701234567')
    ->from('Emil')
    // ->flash() - Optional
    // ->whenDelivered(URL) - Optional
    // ->dontLog() - Optional
    // ->dry() - Optional
    ->send();
```

### Available mediums

[](#available-mediums)

#### SMS

[](#sms)

The FortySixElksSMS have the following methods, all chainable.

### Available Message methods for sms

[](#available-message-methods-for-sms)

`from($mixed)` Accepts a string containing A-Z, a-z, 0-9 up to 11 characters or numbers. Space is not supported. Sms will be sent with that name.

`to($number)` International phone number.

`line($string)` Every string in a line will be on its own row.

`flash()` Will set the message type to flash. Will not endup in sms inbox. See [This tweet](https://twitter.com/46elks/status/583183559420178432) to find out how it looks on an iphone.

`dry()` Enable when you want to verify your API request without actually sending an SMS to a mobile phone. No SMS message will be sent when this is enabled. To be able inspect a dry() request you need to send your message to +4670000000 then you can inspect it at

`whenDelivered('http://localhost.se/ping')` This webhook URL will receive a POST request every time the delivery status changes.

`dontLog()` Enable to avoid storing the message text in your history. The other parameters will still be stored.

#### MMS

[](#mms)

To use MMS simply use `new FortySixElksMMS()` instead of `new FortySixElksSMS()`

The FortySixElksMMS have the following methods, all chainable.

### Available Message methods

[](#available-message-methods)

`from($mixed)`. Accepts 'noreply' as a string or a MMS activated number

`to($number)`. International phone number.

`line($string)`. Every string in a line will be on its own row.

`image()`. URL to the image to send in mms.

### Error handling

[](#error-handling)

> How to handle notification send errors

If for any reason there would be an error when sending a notification it will fire a `Illuminate\Notifications\Events\NotificationFailed` event. You can then listen for that.

Example:

```
Event::listen(NotificationFailed::class, function($event){
    info('Error while sending sms');
});
```

And the event has `$event->notifiable`, `$event->notification`, `$event->channel` and `$event->data`(where you have the exception at `$event->data['exception']`)

Changelog
---------

[](#changelog)

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

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Emil Österlund](https://github.com/larsemil)
- [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

Maintenance34

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~322 days

Total

9

Last Release

317d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20937037?v=4)[Laravel Notification Channels](/maintainers/laravel-notification-channels)[@laravel-notification-channels](https://github.com/laravel-notification-channels)

---

Top Contributors

[![TechTomaz](https://avatars.githubusercontent.com/u/16401378?v=4)](https://github.com/TechTomaz "TechTomaz (10 commits)")[![larsemil](https://avatars.githubusercontent.com/u/690092?v=4)](https://github.com/larsemil "larsemil (8 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (7 commits)")[![jannejava](https://avatars.githubusercontent.com/u/543616?v=4)](https://github.com/jannejava "jannejava (3 commits)")[![robbanl](https://avatars.githubusercontent.com/u/922250?v=4)](https://github.com/robbanl "robbanl (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (1 commits)")[![AxelanderK](https://avatars.githubusercontent.com/u/9843995?v=4)](https://github.com/AxelanderK "AxelanderK (1 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2022.2M8](/packages/laravel-notification-channels-apn)[laravel-notification-channels/expo

Expo Notifications Channel for Laravel

67628.6k1](/packages/laravel-notification-channels-expo)

PHPackages © 2026

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