Download the PHP package ghanem/laravel-smsmisr without Composer
On this page you can find all versions of the php package ghanem/laravel-smsmisr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-smsmisr
Laravel SMS Misr (EGYPT)
Laravel package to send SMS and SMS notifications via SMS Misr from your Laravel application.
Requirements
- PHP >= 8.1
- Laravel 10, 11, or 12
- SMS Misr account (username/password or API token)
Installation
The package uses Laravel's auto-discovery, so the service provider and facade are registered automatically.
Publish the configuration file:
Add your credentials to .env:
Or use token-based authentication:
Usage
Sending SMS
Using the service container:
Bulk SMS
Send to multiple recipients (up to 500K numbers per request):
OTP / Verification SMS
Scheduled SMS
Queue (Async Sending)
Send SMS in the background via Laravel queues:
Configure the queue name in .env:
Or dispatch the jobs directly:
Checking Balance
Health Check
Response Object
All API methods return a SmsmisrResponse object:
Error Handling
Phone Number Normalization
The package automatically normalizes Egyptian phone numbers to international format:
01012345678->201012345678+201012345678->20101234567800201012345678->201012345678010-1234-5678->201012345678
Disable in config:
Validation Rule
Validates prefixes: 010, 011, 012, 015.
Events
| Event | When | Properties |
|---|---|---|
SmsSending |
Before sending | to, message, sender, type |
SmsSent |
After success | to, message, sender, response, type |
SmsFailed |
On failure | to, message, sender, exception, type |
LowBalance |
Balance check alert | smsBalance, verifyBalance, threshold |
The type is 'sms', 'otp', or 'bulk'.
Artisan Commands
Schedule the balance check in your routes/console.php:
Notifications
OTP Notification
Scheduled Notification
SmsmisrMessage API
Testing
In Your Application
Available assertions:
Running Package Tests
Configuration
| Key | Env Variable | Default | Description |
|---|---|---|---|
environment |
SMSMISR_ENVIRONMENT |
1 |
1 = Live, 2 = Test |
endpoint |
SMSMISR_ENDPOINT |
https://smsmisr.com/api/ |
API endpoint |
username |
SMSMISR_USERNAME |
null |
Account username |
password |
SMSMISR_PASSWORD |
null |
Account password |
token |
SMSMISR_TOKEN |
null |
API token (alternative auth) |
sender |
SMSMISR_SENDER |
null |
Default sender name |
auto_normalize |
SMSMISR_AUTO_NORMALIZE |
true |
Auto-normalize phone numbers |
timeout |
SMSMISR_TIMEOUT |
30 |
HTTP timeout (seconds) |
retries |
SMSMISR_RETRIES |
0 |
Retry attempts on failure |
retry_delay |
SMSMISR_RETRY_DELAY |
100 |
Delay between retries (ms) |
rate_limit |
SMSMISR_RATE_LIMIT |
null |
Max messages per minute |
queue |
SMSMISR_QUEUE |
null |
Queue name for async sending |
log_channel |
SMSMISR_LOG_CHANNEL |
null |
Log channel for SMS operations |
low_balance_threshold |
SMSMISR_LOW_BALANCE_THRESHOLD |
100 |
Alert threshold for balance check |
License
MIT
Sponsor
All versions of laravel-smsmisr with dependencies
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/notifications Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0