PHPackages                             mr-apr/najva\_push\_notification - 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. mr-apr/najva\_push\_notification

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

mr-apr/najva\_push\_notification
================================

A package for sending Push notifications

v1.0.1(6y ago)952[1 issues](https://github.com/MrApr/Najva-api/issues)MITPHPPHP &gt;=7.1.3CI failing

Since Jan 21Pushed 6y ago3 watchersCompare

[ Source](https://github.com/MrApr/Najva-api)[ Packagist](https://packagist.org/packages/mr-apr/najva_push_notification)[ RSS](/packages/mr-apr-najva-push-notification/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

PHP Library for using Najva push notification API in order to send push notifications

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

[](#installation)

For install this library in your project copy and paste code below in terminal

```
composer require mr-apr/najva_push_notification

```

Usage
-----

[](#usage)

**1**. First you have to create an object from \\Najva\\Src\\Objects\\NajvaObject() and instantiating it.

```
$najva_object = new \Najva\Src\Objects\NajvaObject();

```

**2**. Then you have to set essential objects by calling proper methods.

RowMethod namemethod's parameterparameter typeaction1setToken()$tokenstringSets Najva API given token2setApiKey()$api\_keystringSets given api key3setTitle()$titlestringSets title for the notification that is going to send4setBody$messagestringSets message for the notification that is going to sent.5setTime$timeCarbon objectSets sending time for notification. It will get sent on the given time.6setUrl$urlstringSets url for sending notification**Example**For sending notifications to all users we have to set all explained methods :

```
$najva_object->setToken("TOKEN")
->setApiKey("API_KEY")
->setTitle("Test Title")
->setBody("Test body")
->setTime(\Carbon\Carbon::now()->addMinute(280)
->toDateTimeString())
->setUrl("https://test.test");

```

**Note 1**

> In order to know what are these method and properties for go to najva push notifcation api documentation :

**Note 2**

> You do not need to use all existed method to set all of these properties ! Just set based on what API are you using.

**Note 3**

> If there is a property in API, that it doesn't have any method to set that property with value, you can set that property with desired value just by making a property for that object. It will use magic methods to make a property with given name and value for the object. Example : $najva\_object-&gt;property\_name = proerty\_value;

**3**. Next we have to Create an object from \\Najva\\Src\\Najva() and instantiating it. This object accepts two parameters in it's constructor. Parameter one that is required should be an najva object which has required data that is Implemented from ObjectFormatterInterface, second parameter that is optional is Driver for sending data. Default driver is rest driver. if you put it null it will create rest driver as default too.

```
$najva = new \Najva\Src\Najva($najva_object,new \Najva\Src\Drivers\RestDriver());

```

**4**. Now we should execute operation. For executing you have to choose one method from 4 available methods to make desirable actions due to API.

```
print_r($najva->sendToAllRequest());

```

**Methods**

RowMethod namedescription1sendToAllRequestSends Push notification to all subscribed users2sendLimitedRequestSends Push notification to limited users with najva UUID Stored keys.3getSegmentsGet Active segments on najva Push notification service4getOneSignalSegmentsGets Segments that are in one-signal website**Test Code**

```
require_once __DIR__."/vendor/autoload.php";

$najva_object = new \Najva\Src\Objects\NajvaObject();

$najva_object->setToken("TOKEN")
->setApiKey("API_KEY")
->setTitle("aaaa")
->setBody("awawa")
->setTime(\Carbon\Carbon::now()->addMinute(280)
>toDateTimeString())
->setUrl("https://marketingshop.ir");

$najva = new \Najva\Src\Najva($najva_object,
new \Najva\Src\Drivers\RestDriver());

print_r($najva->sendToAllRequest());

```

Hope you enjoy using this package. Laravel compatible and full support version will be out soon.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

Total

2

Last Release

2302d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20898637?v=4)[Mohammad Reza Ahmadi Pour](/maintainers/MrApr)[@MrApr](https://github.com/MrApr)

---

Top Contributors

[![MrApr](https://avatars.githubusercontent.com/u/20898637?v=4)](https://github.com/MrApr "MrApr (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mr-apr-najva-push-notification/health.svg)

```
[![Health](https://phpackages.com/badges/mr-apr-najva-push-notification/health.svg)](https://phpackages.com/packages/mr-apr-najva-push-notification)
```

###  Alternatives

[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/apn

Apple APN Push Notification Channel

2021.9M4](/packages/laravel-notification-channels-apn)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

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

Laravel notification driver for Discord.

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

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)

PHPackages © 2026

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