承接 guilhermedev98/larasms 相关项目开发

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

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

guilhermedev98/larasms

Composer 安装命令:

composer require guilhermedev98/larasms

包简介

SMS gateway for Laravel using various vendors (SMSGateway.me, Zenziva, etc)

README 文档

README

StyleCI

Laravel SMS is a package that has abilities to send and receive SMS via SMS gateway from various vendors such as SMSgateway.me, Zenziva.id, etc.

Table of Contents

Requirements

  • PHP 7.0 or above.
  • cURL extension for PHP.
  • Laravel version 5.4 or above.

Available Vendors

Installation Instructions

Install package via Composer by running the command:

composer require yugo/smsgateway -vvv

Publish package assets using the command below:

php artisan vendor:publish

Select package from yugo/smsgateway to automatically copy a config file to your config application directory.

vendor-publish.gif

Note: If you are using Laravel version 5.4, you must setup provider manually by adding Yugo\SMSGateway\Providers\SmsServiceProvider::class to your config/app.php file.

App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
Yugo\SMSGateway\Providers\SmsServiceProvider::class,

Then, publish package vendor using command below.

php artisan vendor:publish --provider="Yugo\SMSGateway\Providers\SmsServiceProvider"

SMSGateway.me

To enable and using SMSgateway.me vendor, you must set new configurations based on SMSgateway.me setting. Add two config values like as below.

SMS_VENDOR="smsgatewayme"
SMSGATEWAYME_DEVICE=
SMSGATEWAYME_TOKEN=

Zenziva.id

Login to your Zenziva.id dashboard account to get userkey and passkey value. Add userkey and passkey to .env file using these configurations.

SMS_VENDOR="zenziva"
ZENZIVA_USERKEY=userkey
ZENZIVA_PASSKEY=passkey

Usage

Sending a new message using Laravel SMS is easy. You just import real-time facade from the package and call the available methods inside it.

use Facades\Yugo\SMSGateway\Interfaces\SMS;

Now, you can use class SMS inside your PHP file. Every vendor has send(array $destinations, string $message) method.

Quick example:

SMS::send(['62891111111'], 'Hello, how are you?');

Additional Methods

Some vendors have additional methods. For example, you can check balance when using Zenziva and check device when using SMSGateway.me.

SMSGateway.me

// get registered device information
SMS::device(?int $id); // $id is nullable

// get detailed information from message
SMS::info(int $id);

// cancel queued message
SMS::cancel(array $id);

By default, SMSgateway.me package will using API configuration from .env file (such as device and token). But, you can set device ID and token programmatically via application. For example:

SMS::setDevice(12345) // make sure it's integer value
  ->setToken('secret-token')
  ->send(['08111111111'], 'Message with custom device and token.');

Zenziva.id

// get credit balance
SMS::credit();

If you want to set userkey and/or passkey manually, you can using setUser(string $user) and setPassword(string $password) method. For example:

SMS::setUser('you')
  ->setPassword('secret')
  ->send(['08111111111'], 'Message with custom user and password.');

License

MIT.

guilhermedev98/larasms 适用场景与选型建议

guilhermedev98/larasms 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 09 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「sms」 「laravel」 「smsgateway」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 guilhermedev98/larasms 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 guilhermedev98/larasms 我们能提供哪些服务?
定制开发 / 二次开发

基于 guilhermedev98/larasms 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-22