This SDK is built and maintained by our community and might not be up to date with the latest Novu features. We are currently working on a new official SDK for PHP.

Novu’s PHP SDK provides simple, yet comprehensive notification management, and delivery capabilities through multiple channels that you can implement using code that integrates seamlessly with your PHP application.

Explore the source code on GitHub

Installation

composer require unicodeveloper/novu

Usage

use Novu\SDK\Novu;

$novu = new Novu(<INSERT_API_KEY_HERE>);

// Sign up on https://dashboard-v2.novu.co and grab your API key from https://dashboard-v2.novu.co/settings

$response = $novu->triggerEvent([
    'name' => '<REPLACE_WITH_TEMPLATE_NAME_FROM_ADMIN_PANEL>',
    'payload' => ['customVariables' => 'Hello'],
    'to' => [
        'subscriberId' => '<SUBSCRIBER_IDENTIFIER_FROM_ADMIN_PANEL>',
        'phone' => '07983882186'
    ]
])->toArray();