定制 danialpanah/farapayamak 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

danialpanah/farapayamak

Composer 安装命令:

composer require danialpanah/farapayamak

包简介

Laravel Package For Sending Text Messages(SMS) Through Farapayamak API.

README 文档

README

Build Status Latest Release on Packagist Software License

Introduction

By using this package you can send SMS Text Messages through Farapayamak RESTful Web Services with your Laravel application.

Installation

  • Use following command to install:
composer require danialpanah/farapayamak

This package supports Laravel auto-discovery feature. If you are using Laravel 5.5 or greater no need to do any further actions, otherwise follow below steps.

  • Add the service provider to your providers[] array in config/app.php in your laravel application:
DanialPanah\Farapayamak\FarapayamakServiceProvider::class
  • For using Laravel Facade add the alias to your aliases[] array in config/app.php in your laravel application:
'Farapayamak': DanialPanah\Farapayamak\Facades\Farapayamak::class

Configuration

  • After installation, you need to add you Farapayamak settings. You can update config/farapayamak.php published file or in you Laravel .env file.

  • Run the following command to publish the configuration file:

php artisan vendor:publish --provider "DanialPanah\Farapayamak\FarapayamakServiceProvider"
  • config/farapayamak.php
return [
    'username' => env('FARAPAYAMAK_USERNAME', ''),
    'password' => env('FARAPAYAMAK_PASSWORD', ''),
    'from' => env('FARAPAYAMAK_FROM', '')
];
  • Add this to .env.example and .env files:
#Farapayamak Credentials and settings
FARAPAYAMAK_USERNAME=
FARAPAYAMAK_PASSWORD=
FARAPAYAMAK_NUMBER=

Usage

Following are some ways which you can have access to farapayamak package:

// Importing the class namespaces before using it
use DanialPanah\Farapayamak\Farapayamak;

$data = [
   'to' => '09121111111',
   'text' => 'Test Message..'
];

$textMessage = new Farapayamak();
$response = $textMessage->send($data);
  • Using Facades:
use DanialPanah\Farapayamak\Facades\Farapayamak;

$response = Farapayamak::send($data);
  • Sending to multiple recipients:
$numbers = ['09121111111', '09132222222', '09153333333'];

$data = [
   'to' => $numbers,
   'text' => 'Multicast Test Message..'
];

$response = Farapayamak::send($data);

Support & Security

This package supports Laravel 5.1 or greater, 6.x and 7.x

  • In case of discovering any issues, please create one on the Issues section.
  • For contribution, fork this repo and implements your code, then create a PR.

License

This repository is an open-source software under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固