- How do I install tartan/laravel-iranian-sms in a Laravel app?
- Install it with composer require tartan/laravel-iranian-sms, then publish the package config with php artisan vendor:publish and add your operator credentials. The package registers a service provider and facade, so driver selection happens through the config file instead of your application code. Because it targets Laravel 5.x, expect to patch boot-time issues before it runs cleanly on Laravel 9, 10, or 11.
- Which Iranian SMS gateways does this package support?
- It ships drivers for the common Iranian operators, including Kavenegar, MelliPayamak, Ghasedak, and SMS.ir-style providers, all behind a single driver-based API. You pick the active operator in the config file and the rest of your code talks to the same facade. Read the driver source before committing, since operator payloads and endpoint details change over time.
- Does tartan/laravel-iranian-sms work with Laravel 10 or Laravel 11?
- Not out of the box. The package is from the Laravel 5.x era with a last release in March 2021, and it relies on helpers and binding patterns that have since changed, so it typically installs but fails at boot on modern versions. Plan on forking it and updating the service provider, helpers, and HTTP layer for your target Laravel major.
- How do I switch SMS providers without rewriting my code?
- Change the default driver in the published config file and supply that operator's API key. Because every operator sits behind the same manager and facade, your sending code stays untouched. This config-driven driver selection is the package's main selling point over a single-operator adapter.
- Can I send SMS from a Laravel notification?
- Yes, the package includes notification channel support, so you can define an SMS channel and use it from notification classes. Credentials and the active operator are still configured through the package config. Wrap the channel in your own infrastructure module so product code never references package classes directly.
- Does it support pattern or template sends, such as OTP verification codes?
- Yes, several Iranian operators expose pattern or template endpoints for verification codes, and the package's drivers cover those payload quirks, including Persian digit and encoding handling. Confirm that the specific driver you need actually implements the pattern call before relying on it. Test against a sandbox or test credential rather than live traffic.
- Is tartan/laravel-iranian-sms actively maintained?
- No. It has a single maintainer, a last release dated 2021-03-18, roughly 25 stars, and essentially no dependents, so treat it as unmaintained. Vendoring or forking the operator adapters is cheap given the small surface area and MIT license. Do not assume upstream will ship fixes for Laravel compatibility or operator API changes.
- How do I test SMS sending without hitting a real Iranian operator?
- The package provides no built-in fakes, so the practical approach is to replace its transport with Laravel's HTTP client and use Http::fake() in your tests. Record per-operator request fixtures and assert the outgoing request shape with contract tests. That is the only reliable guard against an operator silently changing its payload.
- Should I use this package or write my own SMS adapter?
- If you only need one operator at launch, a small first-party adapter of roughly 150 lines is simpler and easier to maintain. The package earns its place when you genuinely need to switch between multiple Iranian gateways at runtime. Either way, define your own SmsSender interface and keep the package behind it.
- Does it handle retries, queues, and delivery receipts?
- There is no evidence of built-in idempotency, retry semantics, or queue integration, and accepted-versus-delivered states are ambiguous in this domain. Push sends onto a Laravel queue and implement retries and delivery-report polling yourself. Treat the drivers as payload builders, not as a delivery guarantee.