kavenegar/laravel-notification
Laravel 5.3/5.4 notification channel for sending SMS via Kavenegar. Install via Composer, configure API key (and optional sender) in services.php, then use KavenegarChannel in notifications and routeNotificationForSms on your notifiable model.
Notification system, aligning with Laravel’s ecosystem and best practices.via() pattern.Notification contract (e.g., routeNotificationFor() vs. routeNotificationForSms()).laravel-notification-channels) or require polyfills.nesbot/carbon + Twilio or laravel-notification-channels for multi-provider support.NotificationChannel interface) be built?Illuminate\Contracts\Notifications\MustVerify and routeNotificationFor() (plural), requiring adapter layers.Illuminate\Notifications\ServiceProvider instead of Laravel 5’s NotificationServiceProvider.ShouldQueue notifications.services.php.NotificationChannel interface).laravel-notification-channels/kavenegar if available, or build a custom channel).notifiable events (e.g., sending, sent).Notifiable model.Notifiable models with routeNotificationForSms().KavenegarChannel.guzzlehttp/guzzle) may go unfixed.KavenegarChannel in a decorator).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Kavenegar API downtime | SMS notifications fail silently. | Implement retries with exponential backoff (manual or via queues). |
| Invalid API key | All SMS notifications fail. | Validate config during deployment; use feature flags. |
| Rate limiting | Throttled requests; partial failures. | Add delay between requests or use batching. |
| Phone number formatting errors | SMS fails to send (e.g., invalid E.164 format). | Sanitize phone numbers before sending; log failures. |
| Laravel upgrade | Package breaks due to deprecated contracts. | Fork/modernize or replace with a maintained package. |
| No error logging | Undetected failures; poor observability. | Add custom logging to KavenegarChannel. |
How can I help you explore Laravel packages today?