rytescube/otpkit 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

rytescube/otpkit

Composer 安装命令:

composer require rytescube/otpkit

包简介

Laravel package to generate otp or one time password

README 文档

README

Latest Stable Version Total Downloads License Issues Stars

Laravel package to generate otp or one time password.

Installation

In Laravel 5.5+ otpkit will install via the new package discovery feature so you only need to add the package to your composer.json file

composer require rytescube/otpkit

after installation you should see

Discovered Package: rytescube/otpkit

and you are ready to go

Basic Usage

For quick generation of an OTP just do

Otp::generate();

This will generate a numeric OTP having length 4.

Advanced Usage

OTP generation

Generate an OTP using three variant. You can set the length of the OTP. If not supplied it will generate an OTP having default length 4.

Otp::generate($type,$length);
Params Value Description Example
$type Otp::ALPHA Generates only alphabetic characters type OTP Otp::generate(Otp::ALPHA); //AXBZ
Otp::NUM (Default) Generates only numeric type OTP Otp::generate(Otp::NUM); //1234
Otp::ALPHA_NUM Generates mix of alphabetic characters & numeric type OTP Otp::generate(Otp::ALPHA_NUM); //1A3D
$length 4 (Default) | 5 | 6 Decides the length of the OTP. Otp::generate(Otp::ALPHA_NUM,5); //2X8DT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固