acidf0x/laracool 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

acidf0x/laracool

最新稳定版本:v1.0.0

Composer 安装命令:

composer require acidf0x/laracool

包简介

CoolSMS SDK Wrapper for Laravel

README 文档

README

CoolSMS PHP SDK Wrapper for Laravel

Installation

install using composer:

 composer require acidf0x/laracool

Then publish the package configuration using Artisan:

 php artisan vendor:publish --provider=AcidF0x\LaraCool\CoolSMSServiceProvider

Update your settings in the generated app/config/coolsms.php configuration file.

return [
    // api_key and api_secret can be obtained from coolsms.co.kr
    'api' => [
        'key' => 'YOUR_API_KEY',
        'secret' => 'YOUR_API_SECRET',
    ],
];

The AcidF0x\LaraCool\CoolSMSServiceProvider is auto-discovered and registered by default, but if you want to register it yourself: Add the ServiceProvider in config/app.php

'providers' => [
    ...
    ...
    AcidF0x\LaraCool\CoolSMSServiceProvider::class,
]

The CoolSMS facade is also auto-discovered, but if you want to add it manually: Add the Facade in config/app.php

'aliases' => [
    ...
    'CoolSMS' => AcidF0x\LaraCool\Facades\CoolSMS::class,
]

Basic Usage

use AcidF0x\LaraCool\Facades\CoolSMS;
use Nurigo\Exceptions\CoolsmsException;

  try {
      // 4 options(to, from, type, text) are mandatory. must be filled
      $options = new \stdClass();
      $options->to = '01000000000';
      $options->from = '0100000000';
      $options->type = 'SMS';
      $options->text = 'text';
      $result = CoolSMS::message()->send($options);
      dump($result);
  } catch (CoolsmsException $e) {
      dump($e->getMessage()); // get error message
      dump($e->getResponseCode()); // get 'api.coolsms.co.kr' response code
  }

See Detail CoolSMS SDK Example

CoolSMS::message() // return \Nurigo\Api\Message
CoolSMS::groupMessage() // return \Nurigo\Api\GroupMessage
CoolSMS::image() // \Nurigo\Api\Image
CoolSMS::senderID() // \Nurigo\Api\SenderID

Requirements

  • Laravel 5.*
  • PHP 5.5 or greater
  • Composer
  • PHP CURL extension
  • PHP JSON extension

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固