jalallinux/smsirlaravel

Boosted Official Sms.ir Laravel Package

v2.1.4 2021-08-18 07:46 UTC

This package is auto-updated.

Last update: 2024-12-18 15:03:27 UTC


README

Unofficial Laravel Package for sms.ir

Latest Stable Version Total Downloads Monthly Downloads License

Hi, if you have an account in sms.ir, you can use this package for laravel

1. Install

composer require jalallinux/smsirlaravel

2. Publish vendor

php artisan vendor:publish

then select jalallinux\Smsirlaravel\SmsirlaravelServiceProvider

  • If using laravel 5.4 or below must register provider and alias in your config/app.php:

Providers: jalallinux\smsirlaravel\SmsirlaravelServiceProvider::class,

Aliases: 'Smsirlaravel' => jalallinux\smsirlaravel\SmsirlaravelFacade::class,

3. Migrate table

php artisan migrate

4. Configuration package

After publish the package files you must open config/smsirlaravel.php set the keys.

'webservice-url' => env('SMSIR_WEBSERVICE_URL','https://ws.sms.ir/'),

'api-key' => env('SMSIR_API_KEY','Your sms.ir api key'),

'secret-key' => env('SMSIR_SECRET_KEY','Your sms.ir secret key'),

'line-number' => env('SMSIR_LINE_NUMBER','Your sms.ir line number'

or you can set your key in .env file:

SMSIR_WEBSERVICE_URL=https://ws.sms.ir/

SMSIR_API_KEY=your api-key

SMSIR_SECRET_KEY=your secret-key

SMSIR_LINE_NUMBER=1000465******

Available Methods:

  • Sending Message:
Smsirlaravel::send($messages, $numbers, $sendDateTime = null);

Smsirlaravel::sendVerification($code, $number, $log = false);

Smsirlaravel::ultraFastSend(array $parameters, $template_id, $number);
  • Panel Details:
Smsirlaravel::credit();

Smsirlaravel::getLines();
  • Customer Club:
Smsirlaravel::addToCustomerClub($prefix, $firstName, $lastName, $mobile, $birthDay = '', $categotyId = '')

Smsirlaravel::sendToCustomerClub($messages, $numbers, $sendDateTime = null, $canContinueInCaseOfError = true);
  • Contact Management:
Smsirlaravel::deleteContact($mobile);

Smsirlaravel::addContactAndSend($prefix, $firstName, $lastName, $mobile, $message, $birthDay = '', $categotyId = '');
  • Message Report:
Smsirlaravel::getReceivedMessages($perPage, $pageNumber, $formDate, $toDate);

Smsirlaravel::getSentMessages($perPage, $pageNumber, $formDate, $toDate);

Smsirlaravel::getSentMessage($bulk);

JalalLinuX