1. Overview
WHMS integrates with the Laravel-BD-SMS package to send SMS messages through multiple Bangladeshi and international SMS providers. Administrators can send individual, bulk, or broadcast SMS from the admin panel. SMS is also triggered automatically for invoice events when enabled via settings.
2. Architecture
| Component | Location | Purpose |
| SmsService | app/Services/SmsService.php | Core service for sending single and bulk SMS via configured providers |
| SmsController | app/Http/Controllers/Admin/SmsController.php | Admin interface for sending SMS and viewing logs |
| LogSentSms Listener | app/Listeners/LogSentSms.php | Logs all SMS sends to ActivityLog |
| NotificationService | app/Services/NotificationService.php | Sends automated SMS for invoice events when enabled |
3. Supported SMS Providers
| # | Provider | # | Provider |
| 1 | SSL Commerz | 10 | QuickSms |
| 2 | BoomCast | 11 | Muthofun |
| 3 | DianaHost | 12 | GreenWeb |
| 4 | Metronet | 13 | Infobip |
| 5 | MimSms | 14 | ElitBuzz |
| 6 | Alpha | 15 | Brilliant |
| 7 | Banglalink | 16 | Tense |
| 8 | Grameenphone | 17 | SMSNoc / BulkSmsBD |
| 9 | OnnoRokom | | |
The default provider is configured via config('sms.default_provider'). Provider API credentials are set in the config/sms.php configuration file.
4. Admin SMS Features
4.1 Sending Modes
| Mode | Description |
| Single | Send to one phone number |
| Multiple | Send to multiple numbers (comma or newline separated) |
| All Clients | Broadcast to all clients with phone numbers |
4.2 Admin Routes
| Route | Method | Description |
| /admin/sms | GET | SMS send form with provider selection and client list |
| /admin/sms/send | POST | Process and send SMS |
| /admin/sms/logs | GET | View SMS delivery logs |
5. Automated SMS for Invoice Events
When enabled via settings, SMS notifications are sent automatically for invoice events:
| Setting Key | Purpose |
notification.sms_enabled | Master toggle for automated SMS (true/false) |
notification.sms_invoice-created | SMS template for new invoices |
notification.sms_invoice-paid | SMS template for payment confirmations |
notification.sms_invoice-overdue | SMS template for overdue notices |
notification.sms_invoice-reminder | SMS template for payment reminders |
SMS templates use the same @{{variable}} syntax as email templates. SMS is sent only to users who have a phone number on their profile.
6. SMS Logging
All SMS sends are logged in two places:
- lbs_log table - Raw provider request/response JSON (from Laravel-BD-SMS package)
- Activity Log - Structured log with recipient, message preview (500 chars), status, and provider name