承接 amiraghaee/rahyabsms 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

amiraghaee/rahyabsms

Composer 安装命令:

composer require amiraghaee/rahyabsms

包简介

Rahyab Payam Gostaran SMS package for Laravel

README 文档

README

Rahyab Payam Gostaran SMS Package


This package provide simple helpers for sending sms from Rahyab Payam Gostran gateway.
You can download the api gateway document here.

This is not an official package but there is no other package for this sms gateway!

Table of Contents

Install

The easiest way to install is by using Composer:

composer require amiraghaee/rahyabsms

Usage

To use the package, you need an password, username and shortcode. To get that you should have a smsonline account. Register and get your authorization details.
Copy the following variables to your project .env file and fill the variables with your data.

RAHYAB_SMS_USERNAME="your-account-username"
RAHYAB_SMS_PASSWORD="your-account-password"
RAHYAB_SMS_SHORTCODE="your-shortcode"

Use rahyabsms on top of your controller or wherever you want:

use AmirAghaee\rahyabsms;

send simple sms

Then you can simply create an instance of rahyabsms and use send method to send a text message:

Rahyabsms::send('09xxxxxxxxx','Hello World!');

parameters

Parameter Required Description Type
number yes The number of the receiver of the message string
message yes Text to be sent string
recId No assign a ID to check status of delivery string

send sms to several users

You can send a text message to several numbers with this method:

$numbers = [
        '09xxxxxxxx1',
        '09xxxxxxxx2',
        '09xxxxxxxx3'
    ];
Rahyabsms::sendAll($numbers, 'Hello World!');

check credit

You can check balance of your account with this method:

Rahyabsms::getCredit();

check expire

You can check expire of your account with this method:

Rahyabsms::GetExpireDate();

Logging

This package can automatically log sent SMS to the database.
To enable this, you must copy the following variables into your project .env file.

RAHYAB_SMS_ENABLE_LOGS=true

Then run following command to create a table at the root of your project:

php artisan migrate

For accessing to the model use following namespace:
namespace AmirAghaee\rahyabsms\Models;

example:

SmsLog::get();

License

Freely distributable under the terms of the MIT license.

统计信息

  • 总下载量: 148
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固