send(), cancel(), receive()), which is suitable for projects where SMS logic is modular and decoupled from business logic.vendor:publish, enabling customization (e.g., API token, sandbox mode).Guzzle (likely bundled via Kavenegar’s SDK) and Laravel’s core..env or config). No built-in rotation or encryption.composer require mahdimajidzadeh/kavenegar
php artisan vendor:publish --provider="MahdiMajidzadeh\Kavenegar\KavenegarServiceProvider"
.env with Kavenegar API token (e.g., KAVENEGAR_API_KEY).use MahdiMajidzadeh\Kavenegar\Facades\Kavenegar;
$result = Kavenegar::send('+989123456789', 'Your OTP is 1234');
create_function).receptor, message) match current API specs.send() for OTPs/notifications.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Kavenegar API downtime | SMS delivery fails | Implement fallback (e.g., email + retry queue). |
| Invalid API token | All requests fail | Validate token on startup; alert on failures. |
| Rate limit exceeded | Requests rejected | Add exponential backoff; use queue. |
| Message encoding issues | Non-Farsi messages fail | Sanitize input; use UTF-8 encoding. |
| Laravel/PHP version mismatch |
How can I help you explore Laravel packages today?