messageway / messagewaylaravel
This package allows you to connect to MSGWay.com server from your laravel applications.
v2.0.1
2024-04-30 05:55 UTC
Requires
- illuminate/support: ^9.0|^10.0|^11.0
- messageway/messagewayphp: ^2.0
Requires (Dev)
- orchestra/testbench: ~7
- phpunit/phpunit: ~9.0
README
MessageWay Laravel
This package allows you to connect to MSGWay.com server from your laravel applications.
Available Methods
- SMS (Iran: 2000, 3000, 9000, 50004)
- Global SMS (with Twilio)
- Messenger
- IVR
Installation
Via Composer
$ composer require messageway/messagewaylaravel
Usage
ApiKey
Please register on MSGWay.com and get apiKey
Environment
Please add environment on .env
file
MESSAGE_WAY_APIKEY=''
Send via SMS
use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel; $message = MessageWayLaravel::sendViaSMS('MOBILE', $templateID); dump($message);
Send via GapMessenger
use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel; $message = MessageWayLaravel::sendViaGap('MOBILE', $templateID, [ 'params' => ['param 1 value', 'param 2 value', 'param 3 value'] ]); dump($message);
Send via IVR
use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel; $templateID = 2; $message = MessageWayLaravel::sendViaIVR('MOBILE', $templateID); dump($message);
Verify OTP
use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel; $verify = MessageWayLaravel::verifyOTP($OTP); dump($verify);
Status
use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel; $status = MessageWayLaravel::getStatus($OTPRefrenceID); dump($status);
License
MIT.