SMS Forge (package name Elanak) is a Laravel package that sends SMS through several Iranian SMS providers behind one fluent interface, for PHP developers who would otherwise integrate each provider's SDK separately.
Rather than installing a separate SDK and writing separate sending code for every SMS panel, SMS Forge wraps them in a single API. Switching gateway means changing the argument to one via() call; the rest of the sending logic stays the same.
The package registers a service provider and an Elanak facade for Laravel auto-discovery. It supports plain text messages as well as pattern/template messages, which is what the providers use for OTP codes and other transactional notifications.
Gateways are implemented under src/Getways/.
- PHP with Composer
- Laravel (service provider and facade are auto-discovered)
- PSR-4 namespace:
Morpheusadam\Elanak\
Install the package:
composer require morpheusadam/SmsForgeInstall the SDKs for the providers you intend to use:
composer require kavenegar/laravel
composer require melipayamak/laravel:1.0.0
composer require ippanel/php-rest-sdkTo remove the package:
composer remove morpheusadam/SmsForgeElanak::send($messages)
->via($provider) // 'kavenegar', 'melipayamak', 'ippanel', 'smsir', 'payamresan'
->api($api)
->from($sender)
->to('09185312051')
->dispatch();Melipayamak:
Elanak::send($messages)
->to($to)
->via($providerName)
->api($api)
->pattern($patternCode, $value)
->dispatch();IPPanel:
Elanak::send($messages)
->to($to)
->via($providerName)
->api($api)
->pattern($patternCode, $value)
->from($sender)
->dispatch();Change the argument passed to via():
->via('melipayamak')
->via('kavenegar')
->via('ippanel')
->via('payamresan')
->via('smsir')Open an issue or submit a pull request to add a provider, fix a bug, or improve the documentation.
MIT. See LICENSE for the full terms.
Morpheus Adam — GitHub · sam.zeonic.me · morpheusadam95@gmail.com
