PHPackages                             notiflow-io/notiflow-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. notiflow-io/notiflow-php

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

notiflow-io/notiflow-php
========================

Official PHP SDK for Notiflow - Event-driven notification platform

00PHP

Since Jan 5Pushed 5mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Notiflow PHP SDK
================

[](#notiflow-php-sdk)

Official PHP SDK for [Notiflow](https://notiflow.io) - Event-driven notification platform.

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

[](#installation)

```
composer require notiflow/notiflow-php
```

Quick Start
-----------

[](#quick-start)

```
use Notiflow\Notiflow;

$notiflow = new Notiflow('sk_live_...');

// Trigger an event
$result = $notiflow->trigger('order.completed', [
    'user_id' => 'user_123',
    'email' => 'john@example.com',
    'order_id' => 'ORD-456',
    'total' => 99.99,
    'currency' => 'USD',
]);

if ($result->isSuccess()) {
    echo "Event sent! ID: " . $result->eventId;
} else {
    echo "Failed: " . $result->error;
}
```

Features
--------

[](#features)

- **Error-safe**: Never throws exceptions - all errors are captured in the Result object
- **Zero dependencies**: Uses native cURL
- **PHP 8.1+**: Modern PHP with readonly classes and named arguments
- **Type-safe**: Full type hints and PHPDoc annotations

Usage
-----

[](#usage)

### Basic Event

[](#basic-event)

```
$notiflow->trigger('user.signup', ['plan' => 'pro']);
```

### Event with User ID

[](#event-with-user-id)

```
$notiflow->trigger('subscription.renewed', [
    'plan' => 'enterprise',
    'amount' => 199.00,
], 'user_789');
```

### Fire-and-Forget (Async)

[](#fire-and-forget-async)

When you don't need the response:

```
$notiflow->triggerAsync('page.viewed', ['url' => '/pricing']);
```

### Alternative Method Names

[](#alternative-method-names)

```
// These are equivalent:
$notiflow->trigger('order.paid', $data);
$notiflow->event('order.paid', $data);
$notiflow->track('order.paid', $data);
```

### Error Handling

[](#error-handling)

The SDK never throws exceptions. Check the result:

```
$result = $notiflow->trigger('order.paid', $data);

if ($result->isFailure()) {
    // Log the error, but your app continues running
    error_log("Notiflow error: " . $result->error);
}
```

Configuration
-------------

[](#configuration)

### Custom Base URL

[](#custom-base-url)

For self-hosted or staging environments:

```
$notiflow = new Notiflow(
    apiKey: 'sk_live_...',
    baseUrl: 'https://your-instance.notiflow.io',
);
```

### Custom HTTP Client

[](#custom-http-client)

Implement `HttpClient` interface for custom transport:

```
use Notiflow\Http\HttpClient;

class GuzzleHttpClient implements HttpClient
{
    public function post(string $url, array $headers, array $body, int $timeout): HttpResponse
    {
        // Your implementation
    }
}

$notiflow = new Notiflow(
    apiKey: 'sk_live_...',
    httpClient: new GuzzleHttpClient(),
);
```

Laravel Integration
-------------------

[](#laravel-integration)

```
// config/services.php
'notiflow' => [
    'api_key' => env('NOTIFLOW_API_KEY'),
    'base_url' => env('NOTIFLOW_URL', 'https://api.notiflow.io'),
],

// AppServiceProvider.php
$this->app->singleton(Notiflow::class, fn () => new Notiflow(
    apiKey: config('services.notiflow.api_key'),
    baseUrl: config('services.notiflow.base_url'),
));

// Usage
app(Notiflow::class)->trigger('order.shipped', $orderData);
```

License
-------

[](#license)

MIT

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance47

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

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://avatars.githubusercontent.com/u/121547469?v=4)[rusinowiczjakub](/maintainers/rusinowiczjakub)[@rusinowiczjakub](https://github.com/rusinowiczjakub)

### Embed Badge

![Health badge](/badges/notiflow-io-notiflow-php/health.svg)

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

###  Alternatives

[maize-tech/laravel-email-domain-rule

Laravel Email Domain Rule

612.0k](/packages/maize-tech-laravel-email-domain-rule)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

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