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 — GitHub - morpheusadam/SmsForge: Robust Laravel/PHP SMS & OTP package with a unified API across multiple providers (Kavenegar, MeliPayamak, and more).

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
Kurdish.md
Kurdish.md
 
 
PERSIAN.md
PERSIAN.md
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 

Repository files navigation

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]

About

Robust Laravel/PHP SMS & OTP package with a unified API across multiple providers (Kavenegar, MeliPayamak, and more).

Topics

ippanelkavenegarlaravellaravel-packagemelipayamaknotificationsotpphpsmssms-gatewaysmsir

Resources

Readme
Activity

Stars

5 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — 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.