定制 franzose/laravel-smpp 二次开发

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

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

franzose/laravel-smpp

最新稳定版本:v1.5

Composer 安装命令:

composer require franzose/laravel-smpp

包简介

SMS sending via SMPP protocol for Laravel framework.

README 文档

README

Laravel SMPP

This package is a tiny wrapper for the onlinecity/php-smpp library. It provides a basic SMPP interface and implementation for the Laravel framework.

Installation

You can install Laravel SMPP using Composer command:

$ composer require franzose/laravel-smpp

Then you need to add LaravelSmpp\LaravelSmppServiceProvider::class to your providers array in the config/app.php and copy default configuration by invoking $ php artisan vendor:publish command.

Usage

You can use the service pretty straightforward and inject dependency in your controller:

<?php

namespace App\Http\Controllers;

class SmsController extends Controller
{
    public function send(SmppServiceInterface $smpp)
    {
        // One number
        $this->smpp->sendOne(1234567890, 'Hi, this SMS was send via SMPP protocol');
        
        // Multiple numbers
        $this->smpp->sendBulk([1234567890, 0987654321], 'Hi!');
    }
}

However it is better to abstract your SMS sending service from the SMPP implementation by defining a SMPP-compatible service interface.

统计信息

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

GitHub 信息

  • Stars: 39
  • Watchers: 3
  • Forks: 32
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-06-08