h-o-sein/kavenegar-laravel
Laravel integration for the Kavenegar SMS REST API. Install via Composer, configure your API key, and send SMS messages through the Kavenegar PHP client with basic error handling for API and HTTP exceptions.
laravel/framework:^8.0), but lacks explicit testing for newer versions (e.g., Laravel 10). Risk: Potential deprecation issues with newer Laravel features (e.g., dependency injection changes).kavenegar/php (v1.0.0), which may have unpatched vulnerabilities or compatibility gaps with modern PHP (e.g., PHP 8.2+)..env scaffolding or Laravel config caching).kavenegar/php.10004346 as string; may need localization).config/app.php (manual step).Kavenegar facade (if extended) or direct API calls.SmsSent) for observability.sms_logs table).composer require h-o-sein/kavenegar-laravel).SmsService class) with error handling.$api = new \Kavenegar\KavenegarApi(config('services.kavenegar.api_key'));
$result = $api->Send('10004346', ['09123456789'], 'Test message');
SendSmsJob) to decouple from HTTP requests.retryAfter or a package like spatie/laravel-queue-scheduler.kavenegar/php:^2.0) and add:
illuminate/support v8.x in composer.json to force compatibility.sms_logs table for tracking.kavenegar/php to a specific version to avoid surprises.kavenegar/php for security patches.catch (\Kavenegar\Exceptions\ApiException $e) {
\Log::error("Kavenegar API failed: " . $e->getMessage());
// Fallback to email/SMS via alternative provider
}
| Failure Type | Impact | Mitigation |
|---|---|---|
| API Key Revoked | All SMS fail | Rotate keys via .env; use multiple keys. |
| Kavenegar API Outage | No SMS delivery | Fallback to secondary provider (e.g., Twilio). |
| Rate Limit Exceeded | Throttled requests | Queue with delay; monitor usage. |
| Invalid Phone Numbers | Failed SMS | Validate numbers before sending. |
| Package Deprecation | Broken functionality | Fork/maintain or migrate to alternative. |
SmsService wrapper.How can I help you explore Laravel packages today?