Configuration
The notifications subsystem is configured via app/Config/Notifications.php.
Configuration Overview
php
<?php
namespace Config;
use Jengo\Notifications\Config\Notifications as BaseNotifications;
class Notifications extends BaseNotifications
{
/**
* Database table for in-app notifications.
*/
public string $table = 'notifications';
/**
* Default SMS provider driver.
* Supported: 'sms_gate', 'africas_talking', 'twilio', 'log', 'null'
*/
public string $defaultSmsDriver = 'log';
/**
* Africa's Talking API credentials.
*/
public array $africasTalking = [
'username' => 'sandbox',
'apiKey' => '',
'senderId' => '',
'defaultCountryCode' => '+254',
];
/**
* Twilio API credentials.
*/
public array $twilio = [
'accountSid' => '',
'authToken' => '',
'fromNumber' => '',
];
/**
* SMSGate (SMS Gateway for Android™) configuration.
*/
public array $smsGate = [
'serverUrl' => 'http://localhost:8080',
'login' => '',
'password' => '',
'token' => '', // Bearer/Server-Key takes precedence
'simNumber' => null, // SIM slot (1, 2, or 3)
'deviceId' => null,
'priority' => null,
'withDeliveryReport' => null,
'skipPhoneValidation' => false,
'defaultCountryCode' => '+254',
'timeout' => 15,
];
/**
* Push notification configuration.
*/
public array $push = [
'driver' => 'log', // 'fcm', 'webpush', 'log', 'null'
'fcm' => [
'projectId' => '',
'serviceAccountJson' => '',
'accessToken' => null,
],
'webpush' => [
'publicKey' => '',
'privateKey' => '',
'subject' => 'mailto:admin@example.com',
],
];
/**
* Slack incoming webhook URL.
*/
public array $slack = [
'webhookUrl' => '',
];
/**
* Transactional Email theme ('default', 'minimal', 'dark').
*/
public string $emailTheme = 'default';
/**
* Application branding for HTML emails.
*/
public array $branding = [
'name' => 'Jengo',
'logo' => '',
'primaryColor' => '#2563eb',
'supportEmail' => 'support@example.com',
];
}Driver Settings
In-App Database ($table)
Specifies the database table where notifications are saved when dispatched via the database channel. Defaults to notifications.
SMS Drivers ($defaultSmsDriver)
sms_gate: Connects directly to SMS Gateway for Android™ running on a local Android device, emulator (http://10.0.2.2:8080), or cloud relay (https://api.sms-gate.app).africas_talking: Native cURL driver for Africa's Talking SMS API with automatic E.164 phone normalization.twilio: Native cURL driver for Twilio Programmable SMS API.log: Logs SMS messages directly towritable/logs/(ideal for local testing).null: Discards SMS messages silently.
Push Drivers ($push['driver'])
webpush: W3C standard WebPush driver utilizing VAPID public/private key pairs.fcm: Google Firebase Cloud Messaging v1 REST API.log/null: Local development testing drivers.
Email Themes ($emailTheme)
default: A clean, modern card layout with header branding, call-to-action buttons, and footer.minimal: A lightweight, typography-focused layout.dark: A dark-mode optimized email template.
