PHPackages                             teurons/neptune-php - 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. teurons/neptune-php

AbandonedArchivedLibrary

teurons/neptune-php
===================

PHP Helpers for Neptune

0831PHP

Since Jun 1Pushed 1y agoCompare

[ Source](https://github.com/teurons/neptune-php)[ Packagist](https://packagist.org/packages/teurons/neptune-php)[ RSS](/packages/teurons-neptune-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Neptune is an hosted event driven out going communication system along with event analytics.

You can fire events to Neptune and react to them for Emails, SMS, Push and App/Dashboard Notifications.

Step 1:
-------

[](#step-1)

- Create a Team at Neptune
- Create an API Token
- Create a `dev` Environment and mark it as Mock

Step 2:
-------

[](#step-2)

Install PHP SDK using Composer

`composer require teurons/neptune-php`

Step 3:
-------

[](#step-3)

Configure following in your .ENV

```
NEPTUNE_ENV=dev
NEPTUNE_TOKEN=

```

That's it. You have configured Neptune.

Usage
=====

[](#usage)

Send Event
----------

[](#send-event)

```
    $neptune = new Neptune();

    $eventType = "login_with_otp";
    $eventData = [
            'otp' => 123456
    ];
    $neptuneData = [
        'user_id' => '343-4324-23432',
        'contact_infos => [
            ['type' => 'email', 'value' => 'rajiv@example.com'],
            ['type' => 'mobile_number', 'value' => '+1XXXXXXXX']
        ]
    ];

    $neptune->fire(
        $eventType,
        $eventData,
        $neptuneData
    );

```

- $eventType - It can be any string, you can following any convention. In above example we used underscore separated lower cases alphanumeric characters.
- $eventData - Data is optional, and can be just empty array. This data is actually sent to your templates, so that the communication sent to your user can be dynamic. The keys from this array would be used to prefill templates data, if you used variables like `{{ otp }}` in your email/sms template.
- $neptuneData = You can use Neptune Data to sent user\_id, contact information and more. You can check available contactTypes here:

Read App Notifications
----------------------

[](#read-app-notifications)

You can read app notification which you can show to user under notifications section of your app.

```
    $neptune = new Neptune();

    $userId = 1;

    $notifications = $neptune->appNotificationsGet($userId, [
        "type" => "unread"
    ]);
```

There are three types possible: all, unread, read

Default is "unread"

Mark Notification as Read
-------------------------

[](#mark-notification-as-read)

You can mark one particular notification as read

```
    $neptune = new Neptune();

    $type = "notification";
    $identifier = "191df352-5eb6-4e92-a0a2-912a485eb7c7";

    $notifications = $neptune->appNotificationMarkAsRead($type,$identifier);
```

Mark All Notification as Read for an User
-----------------------------------------

[](#mark-all-notification-as-read-for-an-user)

```
    $neptune = new Neptune();

    $type = "user";
    $identifier = "1";

    $notifications = $neptune->appNotificationMarkAsRead($type,$identifier);
```

Laravel
-------

[](#laravel)

```
use Teurons\Neptune\NeptuneChannel;

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

    public function toNeptune($notifiable)
    {
        return [
            'event_type' => 'user_requested_to_reset_password',
            'data' => [
                'token' => 123456
            ],
            'user_id' => $notifiable->id,
            "contact_infos" => [
                [
                    "type" => "email",
                    "value" => $notifiable->email
                ]
            ],
        ];
    }

}
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f65a131fc8615471e846ba92fa2926668a0098fb1ebdf322a4d02525b28dbcd?d=identicon)[rjvim](/maintainers/rjvim)

---

Top Contributors

[![rjvim](https://avatars.githubusercontent.com/u/23579455?v=4)](https://github.com/rjvim "rjvim (10 commits)")

### Embed Badge

![Health badge](/badges/teurons-neptune-php/health.svg)

```
[![Health](https://phpackages.com/badges/teurons-neptune-php/health.svg)](https://phpackages.com/packages/teurons-neptune-php)
```

PHPackages © 2026

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