定制 dmn/txtbox 二次开发

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

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

dmn/txtbox

最新稳定版本:v1.0.5

Composer 安装命令:

composer require dmn/txtbox

包简介

Txtbox package

README 文档

README

install

composer require dmn/pkg-txtbox

configuration

txtbox.php

<?php

return [
    'base_uri' => env('TXTBOX_BASE_URI', 'https://ws-live.txtbox.com/'),
    'api_key' => env('TXTBOX_API_KEY'),
    'guzzle' => [],
];

service provider

Dmn\Txtbox\ServiceProvider::class

example

<?php

namespace Dmn\Txtbox\Examples;

use Dmn\Txtbox\Channels\Txtbox;
use Dmn\Txtbox\Messages\TxtboxMessage;
use Illuminate\Notifications\Notification;

class SmsNotification extends Notification
{
    /**
     * Get the notification channels.
     *
     * @param  mixed  $notifiable
     * @return array|string
     */
    public function via($notifiable)
    {
        return [Txtbox::class];
    }

    /**
     * Get Txtbox message
     *
     * @param mixed $notifiable
     *
     * @return TxtboxMessage
     */
    public function toTxtbox($notifiable): TxtboxMessage
    {
        return (new TxtboxMessage())
            ->setMobileNumber($notifiable['mobile_number'])
            ->setMessage('This is a sample sms from package channel txtbox');
    }
}

NOTE:

pwede gamitin rekta yung Dmn\Txtbox\Txtbox, inject lang.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2023-06-30