定制 myomyintaung512/laravel-smspoh-v3 二次开发

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

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

myomyintaung512/laravel-smspoh-v3

最新稳定版本:v1.0.5

Composer 安装命令:

composer require myomyintaung512/laravel-smspoh-v3

包简介

README 文档

README

This package provides an easy way to integrate SMSPoh SMS services into your Laravel application.

Installation

composer require myomyintaung512/laravel-smspoh-v3

Publish the configuration file:

php artisan vendor:publish --provider="myomyintaung512\LaravelSmspoh\SMSPohServiceProvider"

Configuration

Add the following variables to your .env file:

SMSPOH_API_KEY=your_api_key
SMSPOH_API_SECRET=your_api_secret
SMSPOH_SENDER_ID=your_sender_id
SMSPOH_BASE_URL=https://v3.smspoh.com/api/rest

Usage

Basic Usage

use myomyintaung512\LaravelSmspoh\Facades\SMSPoh;

// Send SMS
app()->smspoh->send('1234567890', 'Your message here');

// Check balance
$balance = app()->smspoh->balance();

// Send verification SMS
app()->smspoh->verify('1234567890', 'Your verification code is: 123456');

// Check message status
app()->smspoh->status('message_id');

Using Laravel Notifications

use Illuminate\Notifications\Notification;
use myomyintaung512\LaravelSmspoh\SMSPohChannel;

class VerificationNotification extends Notification
{
    public function via($notifiable)
    {
        return [SMSPohChannel::class];
    }

    public function toSMSPoh($notifiable)
    {
        return [
            'to' => $notifiable->phone,
            'message' => 'Your verification code is: ' . $this->code
        ];
    }
}

License

This package is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-01-28