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 4mo 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

18

—

LowBetter than 8% of packages

Maintenance55

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity12

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://www.gravatar.com/avatar/3bb62280957ca7c1fb4d543f6a36f89592187870391df7a8904e1ccd6afa96ee?d=identicon)[rusinowiczjakub](/maintainers/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

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M228](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M52](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

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

PHPackages © 2026

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