承接 ruslidev/yii2-wablas 相关项目开发

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

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

ruslidev/yii2-wablas

Composer 安装命令:

composer require ruslidev/yii2-wablas

包简介

Yii2 Extension for https://wablas.com

README 文档

README

Yii2 Extension for https://wablas.com/

Usage

To use this extension, simply add the following code in your application configuration:

    //...
    'waBlast' => [
        'class' => \ruslidev\wablas\WablasClient::className(),
        'wablasEndpoint' => getenv('WABLAS_ENDPOINT'),
        'apiToken' => getenv('WABLAS_API_TOKEN'),
    ],
    //...

Default config:

WABLAS_ENDPOINT=https://wablas.com/
WABLAS_API_TOKEN=123456

You can then send an whatsapp as follows:

Send Message

    $message = 'Hello...';
    $phone_number = '08xxxxx'
    $result = Yii::$app->waBlast->sendMessage($message,'08xxxxxx');
    if($result instanceof StreamInterface){
        $resultContent = json_decode($result->getContents());
        $message = $resultContent->data->message[0];
    }

Send Image

    
    $phone_number = '08xxxxx'
    $result = Yii::$app->waBlast->sendImage($imageCaption, $phone_number,$imageUrl ,$secret = false, $priority = false, $type = 'random');
    if($result instanceof StreamInterface){
        $resultContent = json_decode($result->getContents());
    }

Send Document Url

    
    $phone_number = '08xxxxx'
    $result = Yii::$app->waBlast->sendDocumentUrl($docUrl, $phone_number = null , $secret = false, $priority = false, $type = 'random');
    if($result instanceof StreamInterface){
        $resultContent = json_decode($result->getContents());
    }

Send Document File

    $phone_number = '08xxxxx'
    $result = Yii::$app->waBlast->sendDocumentFile($file, $phone_number = null, $secret = false, $priority = false, $type = 'random');
    if($result instanceof StreamInterface){
        $resultContent = json_decode($result->getContents());
    }

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2022-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固