Spark CLI Commands
jengo/notifications comes with dedicated Spark CLI commands for installation, generation, and diagnostic testing.
1. Automated Installer (jengo:install)
Run the complete setup process with zero configuration:
php spark jengo:install notificationsOptions:
--force,--overwrite: Overwrite existing configuration files and re-run migrations.
2. Notification Subsystem Manager (jengo:notifications)
Manage and inspect the state of the notifications engine:
# Run installer
php spark jengo:notifications install
# Check environment health, configuration, and database table readiness
php spark jengo:notifications statusSample status output:
Jengo Notifications Subsystem Status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Configuration: Config/Notifications.php present
Database Table: [notifications] Active (verified)
cURL Extension: Loaded (SMS/Push/Slack ready)3. Scaffolding Notifications (make:notification)
Generate a new notification class in app/Notifications/:
php spark make:notification InvoiceReminderThis creates a pre-formatted notification class implementing via(), toMail(), toDatabase(), and toSms().
4. Scaffolding the Migration (notifications:table)
Generate a custom migration file for the notifications database table:
php spark notifications:tableOptions:
--table: Specify a custom table name (default:notifications).
php spark notifications:table --table=system_alerts5. Testing Channels (notifications:test)
Verify your credentials, carrier gateways, and webhook URLs in real time by dispatching a test payload:
php spark notifications:test <channel> <recipient>Examples
Test Email Delivery:
php spark notifications:test mail dev@example.comTest SMS Carrier Gateway (SMSGate / Africa's Talking / Twilio):
php spark notifications:test sms +254712345678Test In-App Database Notifications:
php spark notifications:test database 1Test Slack Incoming Webhook:
php spark notifications:test slack https://hooks.slack.com/services/XXX/YYY/ZZZTest Outgoing Webhook:
php spark notifications:test webhook https://my-app.com/api/webhook-receiver