ClickatellServiceProvider, ClickatellManager).curl directly.curl or file_get_contents for HTTP requests (deprecated in PHP 8.1+; may need allow_url_fopen or Guzzle polyfill).Http facade or Illuminate\Support\Facades\Http.spatie/laravel-sms?sendSmsTo:delay)?SmsSent, SmsFailed)?monolog integration)?curl with Laravel’s Http facade for consistency.SendSmsJob for async processing.SmsSent/SmsFailed events for observability.config/clickatell.php for API keys/endpoints.curl deprecations, type hints).ClickatellServiceProvider) to bind the library to the container.$this->app->singleton(ClickatellManager::class, function ($app) {
return new ClickatellManager(config('clickatell.api_key'));
});
Clickatell facade for concise usage:
use App\Facades\Clickatell;
Clickatell::send('+123', 'Hello!');
SendSmsJob::dispatch($recipient, $message)->delay(now()->addMinute());
Http::fake()).curl with Http facade or GuzzleHttp\Client.@php 8.0 type hints if extending the library.Illuminate\Support\Str, Illuminate/Contracts/Http/Kernel, etc.Illuminate/Bus for queue jobs.spatie/laravel-sms).SmsFailed events for proactive alerts.use Illuminate\Support\Facades\Http;
use Symfony\Component\HttpClient\Retry\RetryStrategy;
$client = Http::withOptions([
'retry' => RetryStrategy::create(3, 1000),
]);
| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Clickatell API downtime | SMS delivery failures | Fallback to secondary provider (e.g., Twilio). |
PHP curl deprecation |
Library breaks in PHP 8.1+ | Replace with Http facade or Guzzle. |
| Rate limiting | Throttled requests | Implement retry logic with jitter. |
| API key leakage | Security breach | Rotate keys via Laravel env/config. |
| Queue job failures | Undelivered SMS | Dead-letter queue + manual review. |
failed_jobs table).How can I help you explore Laravel packages today?