PHPackages                             larsemil/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. larsemil/46elks

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

larsemil/46elks
===============

Laravel notification channel package for 46Elks.

v1.1.1(6y ago)33.8k1MITPHPPHP &gt;=5.6.4

Since Aug 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/larsemil/46Elks)[ Packagist](https://packagist.org/packages/larsemil/46elks)[ Docs](https://github.com/larsemil/46Elks)[ RSS](/packages/larsemil-46elks/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (6)Versions (10)Used By (0)

Here's the latest documentation on Laravel 5.3 Notifications System:

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 5.3.

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)

- [Installation](#installation)
    - [Setting up the 46Elks service](#setting-up-the-46Elks-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

```
composer require larsemil/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:

```

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

    public function to46Elks($notifiable)
    {
        return (new FortySixElksSMS())
	        ->line('Testsms')
	        ->line('Olle')
	        ->to('+46762216234')
	        ->from('Emil');
    }

```

### 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 up to 11 characters or number. 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.

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

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

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

Recently: every ~178 days

Total

8

Last Release

2518d ago

### Community

Maintainers

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

---

Top Contributors

[![larsemil](https://avatars.githubusercontent.com/u/690092?v=4)](https://github.com/larsemil "larsemil (17 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (7 commits)")[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (7 commits)")[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (4 commits)")[![perifer](https://avatars.githubusercontent.com/u/34488?v=4)](https://github.com/perifer "perifer (4 commits)")[![irazasyed](https://avatars.githubusercontent.com/u/1915268?v=4)](https://github.com/irazasyed "irazasyed (3 commits)")[![casperboone](https://avatars.githubusercontent.com/u/15815208?v=4)](https://github.com/casperboone "casperboone (2 commits)")[![lukewaite](https://avatars.githubusercontent.com/u/618130?v=4)](https://github.com/lukewaite "lukewaite (1 commits)")[![JayBizzle](https://avatars.githubusercontent.com/u/340752?v=4)](https://github.com/JayBizzle "JayBizzle (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/larsemil-46elks/health.svg)

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[craftcms/cms

Craft CMS

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

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2022.1M6](/packages/laravel-notification-channels-apn)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4079.7M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1613.2M11](/packages/laravel-notification-channels-microsoft-teams)

PHPackages © 2026

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