Skip to content

meysamzandy/KaveNegarSmsProvider

Repository files navigation

Kave Negar Sms Provider

GitHub Workflow Status StyleCI Code Intelligence Status Scrutinizer Code Quality Build Status

Packagist Packagist Packagist Packagist

Package description: KaveNegar SMS sender package for laravel

Installation

Install via composer

composer require meysam-znd/kave-negar-sms-provider

Publish package assets

php artisan vendor:publish --provider="MeysamZnd\KaveNegarSmsProvider\ServiceProvider"

Usage

use MeysamZnd\KaveNegarSmsProvider\KaveNegarSmsProvider;
use MeysamZnd\KaveNegarSmsProvider\ToOne;
use MeysamZnd\KaveNegarSmsProvider\ToMany;
use MeysamZnd\KaveNegarSmsProvider\Validation;
use MeysamZnd\KaveNegarSmsProvider\CallMessage;

Send sms to one number.

$akiKey = 'your api key in kavenegar';

$data = [
        'receptor' => 'receiver numbers',
        'sender' => 'sender number',
        'message' => 'your text message',
        'date' => 'send time in UnixTime',
    ];
$sender = new KaveNegarSmsProvider(new ToOne());

// send and get the result
dd ( $sender->send($akiKey, $data) );

Send sms to many numbers with schedule.

for sending sms to few numbers, separate those numbers with ", " as a string.
$akiKey = 'your api key in kavenegar';

$data = [
        'receptor' => 'receiver numbers',
        'sender' => 'sender number',
        'message' => 'your text message',
        'date' => 'send time in UnixTime',
    ];
$sender = new KaveNegarSmsProvider(new ToMany());

// send and get the result
dd ( $sender->send($akiKey, $data) );

Send validation SMS.

$akiKey = 'your api key in kavenegar';

$data = [
        'receptor' => 'receiver numbers', // string
        'token' => 'your validation code',
        'template' => 'your verify template name', // string
    ];
$sender = new KaveNegarSmsProvider(new Validation());

// send and get the result
dd ( $sender->send($akiKey, $data) );

Send voice SMS via call.

$akiKey = 'your api key in kavenegar';

$data = [
        'receptor' => 'receiver numbers', // string
        'message' => 'your text message to call', // string
        'repeat' => 1, //Repeat the message.
    ];
$sender = new KaveNegarSmsProvider(new CallMessage());

// send and get the result
dd ( $sender->send($akiKey, $data) );

Security

If you discover any security related issues, please email instead of using the issue tracker.

Credits

About

KaveNegar SMS sender package for laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages