Laravel Notify Africa is a lightweight Laravel package for sending SMS via the Notify Africa API. It provides a clean, expressive interface for single and bulk messaging, integrates with Laravel Notifications, and simplifies SMS delivery without dealing with raw HTTP requests.
# Laravel Notify Africa
Send SMS through the Notify Africa HTTP API from Laravel apps. This package provides a small typed client, a fluent message builder, structured response objects, Laravel Notification channel support, and a facade—using Laravel’s HTTP client (no direct Guzzle usage in your code).
## Installation
```bash
composer require mg-techlegend/laravel-notify-africa
```
Publish the configuration file:
```bash
php artisan vendor:publish --tag="laravel-notify-africa-config"
```
Laravel discovers the service provider and facade automatically from `composer.json` (`extra.laravel.providers` and `extra.laravel.aliases`). No manual registration is required in typical apps.
Set the following in your `.env` (values are read **only** through `config/notify-africa.php`):
| Variable | Description |
|----------|-------------|
| `NOTIFY_AFRICA_API_TOKEN` | Bearer API token from Notify Africa |
| `NOTIFY_AFRICA_SENDER_ID` | Default sender ID (can be overridden per message) |
| `NOTIFY_AFRICA_BASE_URL` | Optional; default `
api.notify.africa` |
| `NOTIFY_AFRICA_TIMEOUT` | Request timeout in seconds (default `10`) |
| `NOTIFY_AFRICA_CONNECT_TIMEOUT` | Connect timeout in seconds (default `5`) |
| `NOTIFY_AFRICA_HTTP_RETRY_ATTEMPTS` | Total HTTP attempts per call (default `1` = no retries); see HTTP retries |
| `NOTIFY_AFRICA_HTTP_RETRY_DELAY_MS` | Delay in milliseconds between retries (default `250`) |
| `NOTIFY_AFRICA_DEFAULT_COUNTRY_CODE` | Optional; see Phone numbers |
| `NOTIFY_WABA_API_KEY` | WhatsApp (WABA) API key — **separate** credential from SMS; see WhatsApp (WABA) |
| `NOTIFY_WABA_BASE_URL` | Optional; default `
notify-web-assistant-api.be…` |
| `NOTIFY_WABA_TIMEOUT` | WABA request timeout in seconds (default `10`) |
| `NOTIFY_WABA_CONNECT_TIMEOUT` | WABA connect timeout in seconds (default `5`) |
| `NOTIFY_WABA_WEBHOOK_SECRET` | Optional; HMAC-SHA256 secret for verifying inbound WABA webhooks |
| `NOTIFY_WABA_SIGNATURE_HE …