abolfazlrastegar/laravel-sms

package multi sms for Laravel

v1.0.2 2023-07-18 11:40 UTC

This package is auto-updated.

Last update: 2024-10-18 16:21:11 UTC


README

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