GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — SmsForge/README.md at main · morpheusadam/SmsForge

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
111 lines (78 loc) · 2.56 KB
/

README.md

Copy path

File metadata and controls

111 lines (78 loc) · 2.56 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

SMS Forge

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.

Overview

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.

Supported providers

Gateways are implemented under src/Getways/.

Provider Driver name
Kavenegar kavenegar
Melipayamak melipayamak
IPPanel ippanel
SMS.ir smsir
Payamresan payamresan

Requirements

  • PHP with Composer
  • Laravel (service provider and facade are auto-discovered)
  • PSR-4 namespace: Morpheusadam\Elanak\

Installation

Install the package:

composer require morpheusadam/SmsForge

Install 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-sdk

To remove the package:

composer remove morpheusadam/SmsForge

Usage

Send a text message

Elanak::send($messages)
    ->via($provider)   // 'kavenegar', 'melipayamak', 'ippanel', 'smsir', 'payamresan'
    ->api($api)
    ->from($sender)
    ->to('09185312051')
    ->dispatch();

Send a pattern/template message

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();

Switch provider

Change the argument passed to via():

->via('melipayamak')
->via('kavenegar')
->via('ippanel')
->via('payamresan')
->via('smsir')

Contributing

Open an issue or submit a pull request to add a provider, fix a bug, or improve the documentation.

License

MIT. See LICENSE for the full terms.

Author

Morpheus Adam — GitHub · sam.zeonic.me · [email protected]

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.