Download the PHP package schoolpalm/message-delivery without Composer
On this page you can find all versions of the php package schoolpalm/message-delivery. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package message-delivery
SchoolPalm Message Delivery
A Laravel package for multi-channel message delivery supporting Email, SMS, WhatsApp, Push Notifications, and In-App Notifications — with a Notification Engine that orchestrates the entire flow through resolver interfaces.
Table of Contents
- SchoolPalm Message Delivery
- Table of Contents
- Architecture
- Installation
- Aliases
- Configuration
- Configuration Reference
- Message Delivery
- Single Channel
- Multi-Channel
- Context Propagation
- Queue Options
- Notification Engine
- Overview
- Resolvers
- Engine Flow
- Fluent API
- Extending Resolvers
- Channels
- Providers
- SMS Providers
- WhatsApp Providers
- Push Providers
- Email Providers
- In-App Provider
- Provider Definitions
- Provider Configuration Fields
- Provider Registry
- Delivery Tracking
- Events
- Testing
- Running Tests
- Writing Tests
- Publishing
- Config
- Migrations
- License
Architecture
Key principle: The package is an infrastructure package only. It knows nothing about your business models (Student, Parent, Teacher, etc.). All business-specific logic is supplied by your application through resolver interfaces.
Installation
The service provider is auto-discovered. If you disable auto-discovery, add it manually:
Aliases
The package registers two facades:
| Facade | Accessor | Description |
|---|---|---|
MessageDelivery |
message-delivery |
Direct message delivery API |
Notification |
notification |
Notification Engine orchestration |
Configuration
Publish the configuration:
Configuration Reference
Message Delivery
Single Channel
Each channel has a dedicated builder method accessible via the MessageDelivery facade.
SMS:
Email:
Email with view:
Push Notification:
In-App Notification:
WhatsApp:
Multi-Channel
Send the same message through multiple channels:
Or chain with context:
Context Propagation
Attach execution context that flows through the entire delivery:
Queue Options
Send messages through the queue:
Notification Engine
Overview
The Notification Engine is an orchestrator that sits between your business modules and the Message Delivery layer. Instead of calling MessageDelivery::sms()->to(...)->send() directly, you dispatch a notification event and the engine resolves everything.
Resolvers
The engine uses resolver interfaces to determine how to deliver the notification. All resolvers have Null implementations so the package works out of the box. Your application replaces these bindings with custom implementations.
| Resolver Interface | Null Implementation | Purpose |
|---|---|---|
EventResolver |
NullEventResolver |
Enrich event with metadata |
RecipientResolver |
NullRecipientResolver |
Resolve who receives the notification |
PreferenceResolver |
NullPreferenceResolver |
Resolve user channel preferences |
ChannelResolver |
NullChannelResolver |
Determine delivery channels |
LanguageResolver |
NullLanguageResolver |
Determine notification language |
TemplateResolver |
NullTemplateResolver |
Load message templates |
PriorityResolver |
NullPriorityResolver |
Determine message priority |
ScheduleResolver |
NullScheduleResolver |
Determine delivery schedule |
RetryResolver |
NullRetryResolver |
Determine retry policy |
Engine Flow
Fluent API
The NotificationDispatch builder provides a fluent chainable API:
Extending Resolvers
To replace a resolver, bind your implementation in the service container:
The engine will automatically use your implementation.
Channels
The package registers five channels out of the box:
| Channel | Identifier | Provider(s) |
|---|---|---|
email |
Laravel Mail (SES, Mailgun, SMTP, Postmark, etc.) | |
| SMS | sms |
EgoSMS, Twilio, Africa's Talking |
whatsapp |
Meta WhatsApp, Twilio WhatsApp | |
| Push | push |
Firebase Cloud Messaging |
| In-App | in_app |
Database Notifications |
Providers
SMS Providers
EgoSMS (egosms):
Twilio SMS (twilio-sms):
Africa's Talking (africas-talking):
WhatsApp Providers
Meta WhatsApp (meta-whatsapp):
Twilio WhatsApp (twilio-whatsapp):
Push Providers
Firebase Cloud Messaging (firebase):
Email Providers
Laravel Mail (laravel-mail):
The Laravel Mail provider supports any mailer configured in config/mail.php (SES, Mailgun, Postmark, SMTP, Log, etc.).
In-App Provider
Database Notifications (database-notifications):
Recipients can be specified as:
- Associative array with
notifiable_typeandnotifiable_idkeys - Simple string ID (uses configured default notifiable model)
Provider Definitions
Provider definitions expose configuration fields for admin UIs:
Provider Configuration Fields
The package exposes the configuration schema for every provider so your application can initialize provider settings in its own storage (e.g. a tenant settings scope). The package does not persist anything — it only returns the fields; you decide where and how to save them.
Each field is a plain array with the canonical keys:
| Key | Type | Description |
|---|---|---|
name |
string | Field identifier (e.g. api_key) |
label |
string | Human-readable label |
type |
string | text, password, select, boolean, number… |
required |
bool | Whether the field is mandatory |
placeholder |
?string | Input placeholder |
description |
?string | Help text |
default |
mixed | Default value |
options |
array | Allowed values for select fields |
secret |
bool | Whether the field contains sensitive data |
Available APIs
All are accessible via the MessageDelivery facade:
Initializing Settings (e.g. a Settings Scope)
A common pattern is to seed a tenant's settings when a provider is enabled:
To separate credentials from non-sensitive options, use providerScopedSettings():
You can store $scoped['secrets'] in an encrypted store and $scoped['secured'] in a normal settings table.
Registered Providers
| Provider | Channel | Fields |
|---|---|---|
laravel-mail |
email |
mailer |
egosms |
sms |
api_url, username, password, sender_id |
twilio-sms |
sms |
sid, token, from |
africas-talking |
sms |
api_key, username, sender_id |
meta-whatsapp |
whatsapp |
access_token, phone_number_id, version, verify_ssl |
twilio-whatsapp |
whatsapp |
sid, token, from |
firebase-push |
push |
credentials_json, project_id, server_key |
database-notifications |
in_app |
default_notifiable |
Provider Registry
The provider registry manages the lifecycle of provider factories:
Delivery Tracking
When enabled, the package records delivery lifecycle events:
Each delivery goes through statuses:
queued→processing→sent→delivered/failed
Data is stored in the message_deliveries table and operational logs are written via AppLogger.
Events
| Event | Description |
|---|---|
MessageSending |
Dispatched before a message is sent |
MessageSent |
Dispatched after a message is sent successfully |
MessageFailed |
Dispatched when a message fails |
DeliveryReceiptReceived |
Dispatched when a delivery receipt is received |
Testing
Running Tests
This runs all 225+ tests (712+ assertions) covering:
- Each channel and provider
- Delivery tracking lifecycle
- Provider resolution and configuration
- Failure handling and timeouts
- Metadata handling
- Multi-channel message building
- Notification Engine dispatch
- Resolver resolution and replacement
- Default (Null) resolver behavior
- Queue options
- Context propagation
Writing Tests
Publishing
Config
Migrations
License
MIT License. See LICENSE for more information.
All versions of message-delivery with dependencies
illuminate/mail Version ^12.0
illuminate/queue Version ^12.0
illuminate/support Version ^12.0
schoolpalm/app-logger Version ^1.0
schoolpalm/queued-jobs Version ^1.0