Skip to content

multi package sms laravel support sms.ir and kavenegar

License

Notifications You must be signed in to change notification settings

abolfazlrastegar/laravel-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alt text

Total Downloads Latest Stable Version License

Package Larave-sms

With this package, you can use the capabilities of the SMS system sms.ir and kavenegar

Install package laravel-sms

  composer require abolfazlrastegar/laravel-sms

Publish config

  php artisan vendor:publish --provider="Abolfazlrastegar\LaravelSms\Providers\SmsServiceProvider" --tag="config"

Docs drivers

sms.ir

kavenegar

Use method sendVerifyCode

  // this model SMS system kavenegar
  Sms::make('kavenegar')
     ->mobile('09105805770')
     ->template('454545')
     ->params(['token' => 122254])
     ->sendVerifyCode();

or

  Sms::make()
     ->defaultSms()
     ->mobile('09105805770')
     ->template('454545')
     ->params(['token' => '122254', 'token2' => '54875', 'token3' => '54875'])
     ->sendVerifyCode();

Use method sendMessages

  Sms::make('kavenegar')
     ->mobile(['09105805772', '09105805772', '09105805772'])
     ->message('set message for send')
     ->params([
        'date' => 'اختیاری',
        'sender' => 'اختیاری',
        'type' => 'اختیاری',
        'localid' => 'اختیاری'
     ]) 
     ->sendMessages();

or

  Sms::make()
     ->defaultSms()
     ->mobile(['09105805772', '09105805772', '09105805772'])
     ->message('set message for send')
     ->params([
        'date' => 'اختیاری',
        'sender' => 'اختیاری',
        'type' => 'اختیاری',
        'localid' => 'اختیاری'
     ])
     ->sendMessages();

Use method sendMessageGroup

  Sms::make('kavenegar')
     ->mobile(['09105805772', '09105805772', '09105805772'])
     ->message(['set message for send1', 'set message for send2', 'set message for send3'])
     ->params([
         'sender' => ['5455557', '987565423', '6322154'],
         'date' => 'اختیاری',
         'type' => 'اختیاری',
         'localmessageids' => 'اختیاری',
     ])
     ->sendMessageGroup();

or

  Sms::make()
     ->defaultSms()
     ->mobile(['09105805772', '09105805772', '09105805772'])
     ->message(['set message for send1', 'set message for send2', 'set message for send3'])
     ->params([
         'sender' => ['5455557', '987565423', '6322154'],
         'date' => 'اختیاری',
         'type' => 'اختیاری',
         'localmessageids' => 'اختیاری',
     ])
     ->sendMessageGroup();

Use method voiceCall

this metode SMS system ['kavenegar'] support

  Sms::make('kavenegar')
    ->message('set message for voice call')
    ->mobile(['09105805772', '09105805772', '09105805772'])
    ->voiceCall();

or

  Sms::make()
    ->defaultSms()
    ->message('set message for voice call')
    ->mobile(['09105805772', '09105805772', '09105805772'])
    ->voiceCall();

Function Parameter

Driver Method Parameter Support
kavenegar params() ['token' => 122254] // one parameter
['token' => 122254, 'token2' => 54875, 'token3' => 54875] // multi parameter
Yes
Sms.ir params() ['name' => 'verify', 'value' => 45666] // send message code verify login
[
['name' => 'name_product', 'value' => 45666]
['name' => 'price', 'value' => 5000]
] // send message Factor buy product
Yes
Kavenegar mobile() '09105805770' // use for one user
['09105805770', '09105805770', '09105805770'] // Use for users
Yes
Sms.ir mobile() '09105805770' // use for one user
['09105805770', '09105805770', '09105805770'] // Use for users
Yes
Kavenegar voiceCall() Yes
Sms.ir voiceCall() No
Kavenegar message() 'set message for voice call'
[
'set message for send1',
'set message for send2',
'set message for send3'
]
Yes
Sms.ir message() 'set message for user'
[
'set message for user1',
'set message for user2',
'set message for user3'
]
Yes