PHPackages                             tarre/laravel-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. [API Development](/categories/api)
4. /
5. tarre/laravel-46elks

ActiveLibrary[API Development](/categories/api)

tarre/laravel-46elks
====================

A wrapper for php-46elks

1.4.5(2mo ago)11.2k2MITPHPCI failing

Since Feb 12Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/tarreislam/laravel-46elks)[ Packagist](https://packagist.org/packages/tarre/laravel-46elks)[ RSS](/packages/tarre-laravel-46elks/feed)WikiDiscussions master Synced today

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

[![](https://camo.githubusercontent.com/ec04599bfd34569e82b4f8535ea4e1b1d8277ffbfbea747fbb762d0ae293d2dc/68747470733a2f2f692e696d6775722e636f6d2f333279414769392e706e67)](https://camo.githubusercontent.com/ec04599bfd34569e82b4f8535ea4e1b1d8277ffbfbea747fbb762d0ae293d2dc/68747470733a2f2f692e696d6775722e636f6d2f333279414769392e706e67)

[![](https://camo.githubusercontent.com/f8dc41bc3574e7b8415e10f5b07b4fc99073818fafac857d883428219d2e2f60/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74617272652f6c61726176656c2d3436656c6b733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tarre/laravel-46elks)[![](https://camo.githubusercontent.com/e11db38f79bcbbb6de2338bf77734a51197c5e98190e6139e7a599d39ffb1cd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f74617272652f6c61726176656c2d3436656c6b733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tarre/laravel-46elks)

About Laravel-46Elks
--------------------

[](#about-laravel-46elks)

Laravel-46Elks is a SMS notification driver for [Laravel Notifications](https://laravel.com/docs/6.x/notifications), written to streamline the interaction between 46elks API and your Laravel application. For generic PHP usage, please check out [php-46elks](https://github.com/tarreislam/php-46elks) instead.

### Installation

[](#installation)

**Install with composer**

```
composer require tarre/laravel-46elks

```

**Publish config**

`php artisan vendor:publish --tag="laravel-46elks"`

**Adjust config**

Add this to your `.env` file

```
e46ELKS_FROM=MyApp
e46ELKS_USERNAME=xxx
e46ELKS_PASSWORD=yyy
e46ELKS_DRY_RUN=false
e46ELKS_WHEN_DELIVERED=false
```

### Example usage

[](#example-usage)

**User model**

```
class User Extends Model
{
    use Notifiable;

    public function routeNotificationFor46elks()
    {
        return '+46701474417'; // could also be an array of strings ['number1', 'number2'] etc
    }
}
```

**Notification**

```
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Tarre\Laravel46Elks\Messages\SmsMessage;

class TestNotification extends Notification
{
    use Queueable;

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

    /**
     * Send the message via 46elks
     *
     * @param mixed $notifiable
     * @return SmsMessage
     */
    public function to46elks($notifiable)
    {
        return (new SmsMessage)
            ->line('Hello ' . $notifiable->name)
            ->line('') // will produce new line
            ->line('Wsup?');
    }
}
```

If you are using `toMail` already, check out [Piggybacking on Notifications toMail method](docs/piggybacking-to-mail.md)

### Available `SmsMessage` methods

[](#available-smsmessage-methods)

- `__construct(array $lines)` Alternative to `->line('')`
- `->line($line)` Add text message line
- `from($senderId)` Overrides the .env file
- `cc($e164Number)` Add more e164 recipients
- `whenDelivered($url)` Overrides the .env file
- `flash($state = true)` Flash SMS are shown immediately on the receivers phone and do not disappear until the receiver has confirmed the message. This feature is perfect for messages that really have to be read by the receiver.

### More

[](#more)

- [Piggybacking on Notifications toMail method](docs/piggybacking-to-mail.md)
- [Accessing the instance elsewhere in your application](docs/accessing-elsewhere.md)
- [Validate origin on your callbacks](docs/validate-origin-callbacks.md)
- [Validate user input](docs/validate-input.md)

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance85

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Recently: every ~416 days

Total

14

Last Release

80d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17804356?v=4)[xgodx](/maintainers/xgodx)[@XGODX](https://github.com/XGODX)

---

Top Contributors

[![tarreislam](https://avatars.githubusercontent.com/u/9095570?v=4)](https://github.com/tarreislam "tarreislam (18 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.8M142](/packages/laravel-cashier)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M162](/packages/spatie-laravel-health)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[syntech/syntechfcm

A Laravel package for FCM

5611.1k](/packages/syntech-syntechfcm)[swisnl/laravel-mautic

Laravel wrapper for Mautic API

1116.7k](/packages/swisnl-laravel-mautic)

PHPackages © 2026

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