Download the PHP package papayacloud/laravel-sms without Composer

On this page you can find all versions of the php package papayacloud/laravel-sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sms

Laravel Sms

Laravel 贴合实际需求同时满足多种通道的短信发送组件

Build Status Scrutinizer Code Quality Code Coverage Build Status Latest Stable Version Latest Unstable Version License

Featrue

基于业务需求在 overtrue/easy-sms 基础进行扩展开发,主要实现如下目标:

  1. 支持短信验证码直接在 config 中配置模板ID
  2. 支持短信验证码自定义长度
  3. 支持短信验证码有效分钟,默认5分钟
  4. 支持短信验证码重试次数,防止用户意外输错验证码导致需要再次发送验证码的问题。
  5. 支持短信验证码未验证时,用户再次请求验证码,在有效分钟内验证码保持一致。
  6. 集成短信发送路由,支持 web 和 api 发送方式。
  7. 支持验证码调试,debug 模式下可直接查询手机号目前有效的验证码
  8. 支持短信验证码发送记录保存到数据库
  9. 短信发送频率限制,同一 IP 限定时间内请求次数

TODO:

  1. 支持语音验证码

安装

低于 Laravel5.5 版本

config/app.php 文件中 'providers' 添加

config/app.php 文件中 'aliases' 添加

使用

发送验证码

  1. 实现了发送短信验证码路由,支持 web 和 api ,可以自定义路由的 prefix。

POST请求 http://your.domain/sms/verify-code

参数:mobile

备注:为了开发调试方便,在 debug 模式下不会验证手机的有效性。

返回参数:

  1. 如果需要自定义路由,也可以通过使用Facade发送验证码:

由于使用多网关发送,所以一条短信要支持多平台发送,每家的发送方式不一样,但是我们抽象定义了以下公用属性:

默认使用 default 中的设置来发送,如果某一条短信你想要覆盖默认的设置。在 send 方法中使用第三个参数即可:

定义短信

容联云通讯为例:你可以根据发送场景的不同,定义不同的短信类,通过继承 Overtrue\EasySms\Message 来定义短信模型:

使用,具体请参考iBrand\Sms\Test\CustomMessage

验证验证码

配置模板 ID

config/ibrand/sms.phpgateways 参数可以直接添加 code_template_id 来配置模板 id

配置 Content

非模板类通道,可以通过 config/ibrand/sms.php 自定义短信内容

'content' => '【your signature】亲爱的用户,您的验证码是%s。有效期为%s分钟,请尽快验证。'

debug

在实际开发中会存在并不用真实发出验证码的情况,因此在 debug 模式下,可以通过

http://your.domain/api/sms/info?mobile=1898888XXXX 来直接只看某个手机号当前有效验证码信息。

database log

目前已经支持把发送记录保存到数据库,执行 php artisan migrate 生成  laravel_sms_log 表。

同时在 config/ibrand/sms.phpdblog 设置为 true

Resources

  1. overtrue/easy-sms
  2. toplan/laravel-sms

All versions of laravel-sms with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
overtrue/easy-sms Version ~1.0
doctrine/dbal Version ^2.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package papayacloud/laravel-sms contains the following files

Loading the files please wait ....