PHPackages                             pteal79/native-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. pteal79/native-notification

ActiveNativephp-plugin[Mail &amp; Notifications](/categories/mail)

pteal79/native-notification
===========================

A NativePHP plugin for dispatching native notifications via OnNative events

1.0.2(3mo ago)035↓50%MITPHPPHP ^8.2

Since Apr 18Pushed 3mo agoCompare

[ Source](https://github.com/pteal79/native-notification)[ Packagist](https://packagist.org/packages/pteal79/native-notification)[ RSS](/packages/pteal79-native-notification/feed)WikiDiscussions main Synced 3w ago

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

NativeNotification Plugin for NativePHP Mobile
==============================================

[](#nativenotification-plugin-for-nativephp-mobile)

Dispatches a `NativeNotification` event through the native layer via a single `SendNotification` bridge call. The event carries a nullable string payload and can be consumed in PHP with `#[OnNative]`.

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

[](#installation)

```
composer require pteal79/native-notification
php artisan vendor:publish --tag=nativephp-plugins-provider
php artisan native:plugin:register pteal79/native-notification
php artisan native:plugin:list
```

Usage
-----

[](#usage)

### PHP (Livewire/Blade)

[](#php-livewireblade)

```
use PTeal79\NativeNotification\Facades\NativeNotification;

NativeNotification::sendNotification('Hello world!');
NativeNotification::sendNotification(null);
```

### Listening for the Event

[](#listening-for-the-event)

```
use Native\Mobile\Attributes\OnNative;
use PTeal79\NativeNotification\Events\MobileEvent;

#[OnNative(MobileEvent::class)]
public function handleNativeNotification(?string $message): void
{
    // $message is the string passed to sendNotification()
}
```

### JavaScript

[](#javascript)

```
import { NativeNotification, Events } from '@pteal79/native-notification';
import { on, off } from '@nativephp/native';

await NativeNotification.sendNotification('Hello!');

const handler = (payload) => console.log(payload.message);
on(Events.MobileEvent, handler);
off(Events.MobileEvent, handler);
```

Events
------

[](#events)

EventPayloadDescription`MobileEvent``{ message: string|null }`Dispatched by the native layer when `sendNotification` is calledLicense
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance82

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Total

3

Last Release

94d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/167c450c5528b16682698e73dc0a8cb5b537244340d1696502cfc3f3f92ebdd1?d=identicon)[pteal79](/maintainers/pteal79)

---

Top Contributors

[![Elite-Cleaning](https://avatars.githubusercontent.com/u/102381701?v=4)](https://github.com/Elite-Cleaning "Elite-Cleaning (3 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/pteal79-native-notification/health.svg)

```
[![Health](https://phpackages.com/badges/pteal79-native-notification/health.svg)](https://phpackages.com/packages/pteal79-native-notification)
```

PHPackages © 2026

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