PHPackages                             gdpa/kavenegar - 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. gdpa/kavenegar

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

gdpa/kavenegar
==============

Kavenegar Notifications driver

v4.1(5y ago)43.7k1MITPHPPHP ^7.3|^8.0CI failing

Since Aug 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gdpa/kavenegar)[ Packagist](https://packagist.org/packages/gdpa/kavenegar)[ Docs](https://github.com/gdpa/kavenegar)[ RSS](/packages/gdpa-kavenegar/feed)WikiDiscussions master Synced today

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

Kavenegar notifications channel for Laravel 5.3+
================================================

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/e79b38419536f6b3d9aaac0c5ff5d9359898b3822dff168fc7b494c4259b9a2f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676470612f6b6176656e656761722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gdpa/kavenegar)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/27763edfea719fe9f3c8f9e8d50d4e212fe3b49f0a7feb5db82760332fc1d04c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f676470612f6b6176656e656761722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/gdpa/kavenegar)[![StyleCI](https://camo.githubusercontent.com/2cc5ac540377368a66aaf2a50eb3317165fca9dca6f764fa29b5a71d111c4af5/68747470733a2f2f7374796c6563692e696f2f7265706f732f3134353230353032342f736869656c64)](https://github.styleci.io/accounts/145205024)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e847121420cd55a4b7d8c4c4983081d5839fb6e240c433d898bc39e646a382a1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f676470612f6b6176656e656761722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gdpa/kavenegar/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/a24095f646deaad630a82dafa833c7c80fc9517b739a3535c1597b55b6c8cb6d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f676470612f6b6176656e656761722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gdpa/kavenegar/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/cc20fbe22bc06760ab8c4b1a1b6c19f54a1da2858fe8cb5cb2bc124aeb319da3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676470612f6b6176656e656761722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gdpa/kavenegar)

This package makes it easy to sent [Kavenegar](https://kavenegarpush.com//) Notifications with Laravel 5.3+.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the Kavenegar service](#setting-up-the-kavenegar-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 gdpa/kavenegar
```

Install for laravel 7:

```
composer require gdpa/kavenegar:^3.4
```

Install for laravel 6:

```
composer require gdpa/kavenegar:^2.0
```

Install for laravel &lt; 5.8:

```
composer require gdpa/kavenegar:^1.0
```

### Setting up the Kavenegar service

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

Add your Kavenegar REST API Key to your `config/services.php`:

```
// config/services.php
...
'kavenegar' => [
    'api_key' => env('KAVENEGAR_API_KEY'),
],
...
```

Usage
-----

[](#usage)

There are two channels that you can use in your `via()` method inside the notification: `KavenegarChannel` which represent `simple send` api and `KavenegarVerifyChannel` which provide `verify lookup` api.

```
use NotificationChannels\Kavenegar\KavenegarChannel;
use NotificationChannels\Kavenegar\KavenegarMessage;
use Illuminate\Notifications\Notification;

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

    public function toKavenegar($notifiable)
    {
        return KavenegarMessage::create()
            ->sender("your-desired-sender-number")
            ->message('Hello world');
    }
}
```

```
use NotificationChannels\Kavenegar\KavenegarVerifyChannel;
use NotificationChannels\Kavenegar\KavenegarMessage;
use Illuminate\Notifications\Notification;

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

    public function toKavenegar($notifiable)
    {
        return KavenegarMessage::create()
            ->template("your-template-key(Refer to Kavenegar Docs)")
            ->type('sms')
            ->token('your default token on your verify message template')
            ->token('additional token data. For example token10', 10);
    }
}
```

In order to let your Notification know which Kavenegar user you are targeting, add the `routeNotificationForKavenegar` method to your Notifiable model.

This method needs to return an array containing the mobile number of your receptor.

```
public function routeNotificationForKavenegar()
{
    return [
        'mobile_number' => 'receptor mobile number',
    ];
}
```

### Available methods

[](#available-methods)

- `sender('')`: Accepts a string value for setting sender number on kavenegar.
- `message()`: Accepts a string value for setting your sms message.
- `template()`: Accepts a string value for setting your sms template.
- `type()`: Accepts a string value for setting your service type (sms, voice, ...).
- `tokens()`: Accepts two string value for setting your tokens. Second string is optional and in case you don't provide it, it set your default token.

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)

- [Morteza Poussaneh](https://github.com/gdpa)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity74

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

Recently: every ~0 days

Total

9

Last Release

2017d ago

Major Versions

v1.0 → v2.02020-12-13

v2.0 → v3.02020-12-13

v3.0 → v4.02020-12-13

v3.4 → v4.12020-12-20

PHP version history (4 changes)v1.0PHP &gt;=7.0.0

v2.0PHP ^7.2

v3.0PHP ^7.2.5

v4.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7866747?v=4)[MortezaPoussaneh](/maintainers/gdpa)[@gdpa](https://github.com/gdpa)

---

Top Contributors

[![gdpa](https://avatars.githubusercontent.com/u/7866747?v=4)](https://github.com/gdpa "gdpa (17 commits)")

---

Tags

kavenegarkavenegar-notifications-channellaravelnotificationssms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gdpa-kavenegar/health.svg)

```
[![Health](https://phpackages.com/badges/gdpa-kavenegar/health.svg)](https://phpackages.com/packages/gdpa-kavenegar)
```

###  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)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.7M42](/packages/laravel-notification-channels-telegram)[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)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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