PHPackages                             meshgroup/megafon-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. meshgroup/megafon-notification-channel

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

meshgroup/megafon-notification-channel
======================================

v1.0.8(3y ago)039MITPHPPHP &gt;=5.6.4

Since Apr 8Pushed 3y agoCompare

[ Source](https://github.com/Nolikzero/megafone-api)[ Packagist](https://packagist.org/packages/meshgroup/megafon-notification-channel)[ RSS](/packages/meshgroup-megafon-notification-channel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (9)Used By (0)

Megafon notifications channel for Laravel 5.3+
==============================================

[](#megafon-notifications-channel-for-laravel-53)

This package makes it easy to send notifications using megafon with Laravel 5.3+.

Contents
--------

[](#contents)

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

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

[](#installation)

You can install the package via composer:

```
composer require meshgroup/megafon-notification-channel
```

Then you must install the service provider:

```
// config/app.php
'providers' => [
    ...
    Meshgroup\Megafon\MegafonServiceProvider::class,
],
```

### Setting up the Megafon service

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

Add your Megafon login, password and default sender name (or phone number) to your `config/services.php`:

```
// config/services.php
...
'megafon' => [
    'login'  => env('MEGAFON_LOGIN'),
    'password' => env('MEGAFON_PASSWORD'),
    'sender' => 'John_Doe'
],
...
```

> If you want use other host than `https://a2p-api.megalabs.ru/`, you MUST set custom host WITH trailing slash.

```
// .env
...
MEGAFON_HOST=https://a2p-api.megalabs.ru/
...

```

```
// config/services.php
...
'megafon' => [
    ...
    'host' => env('MEGAFON_HOST'),
    ...
],
...
```

Usage
-----

[](#usage)

You can use the channel in your `via()` method inside the notification:

```
use Illuminate\Notifications\Notification;
use Meshgroup\Megafon\MegafonMessage;
use Meshgroup\Megafon\MegafonChannel;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [MegafonChannel::class];
    }

    public function toMegafon($notifiable)
    {
        return MegafonMessage::create("Task #{$notifiable->id} is complete!");
    }
}
```

In your notifiable model, make sure to include a `routeNotificationForMegafon()` method, which returns a phone number or an array of phone numbers.

```
public function routeNotificationForMegafon()
{
    return $this->phone;
}
```

### Available methods

[](#available-methods)

`from()`: Sets the sender's name or phone number.

`content()`: Set a content of the notification message.

`sendAt()`: Set a time for scheduling the notification message.

Changelog
---------

[](#changelog)

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

Testing
-------

[](#testing)

```
$ composer test
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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 ~16 days

Recently: every ~28 days

Total

8

Last Release

1384d ago

Major Versions

v0.0.1 → v1.0.02022-04-08

### Community

Maintainers

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

---

Top Contributors

[![dnbh](https://avatars.githubusercontent.com/u/47099983?v=4)](https://github.com/dnbh "dnbh (5 commits)")[![Nolikzero](https://avatars.githubusercontent.com/u/14997927?v=4)](https://github.com/Nolikzero "Nolikzero (2 commits)")

### Embed Badge

![Health badge](/badges/meshgroup-megafon-notification-channel/health.svg)

```
[![Health](https://phpackages.com/badges/meshgroup-megafon-notification-channel/health.svg)](https://phpackages.com/packages/meshgroup-megafon-notification-channel)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

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

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[laravel-notification-channels/fcm

FCM (Firebase Cloud Messaging) Notifications Driver for Laravel

5917.0M16](/packages/laravel-notification-channels-fcm)[s-ichikawa/laravel-sendgrid-driver

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

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)

PHPackages © 2026

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