lakshmajim/uniquecode
Composer 安装命令:
composer require lakshmajim/uniquecode
包简介
OTP generating package
README 文档
README
##WHAT IT IS?
- This package is used to generate one-time password [ a random string or number]
##INSTALLATION
- Download package form https://github.com/lakshmaji/otp .
- OR YOU CAN RUN FOLLOWING COMMAND FROM TERMINAL
- With composer you can run this line composer require lakshmaji/uniquecode
Run this command from the Terminal:
composer require lakshmaji/uniquecode
composer update
##LARAVEL INTEGRATION
you need to add the service provider. Open app/config/app.php, and add a new item to the providers array.
Lakshmaji\UniqueCode\UniqueCodeServiceProvider::class,
Then, add a Facade for more convenient usage. In app/config/app.php add the following line to the aliases array:
'UniqueCode'=> Lakshmaji\UniqueCode\Facade\UniqueCode::class,
Again do composer update
METHOD, AVAILABLE PARAMETERS AND RESPONSES
#####Method
OTP(integer, string)
use UniqueCode; UniqueCode::OTP(otp_length, otp_charcaters_domain)
The message_array parameters
| PARAMETER | DESCRIPTION |
|---|---|
| otp_length | This defines the length of the random string generated as out put |
| otp_charcaters_domain | This defines the range of charcters taken to generate random string i.e, otp or verification code |
##Generating OTP or verification code
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Controllers\Controller; use UniqueCode; /** * UniqueCode - Package usage Example * * @access public * @since 1.2.0 * @author lakshmaji */ class UniqueCodeTest extends Controller { public function testGetOtp() { $code = UniqueCode::OTP(3,'abc45'); echo $code; //This will outputs a4c or 5b2 or ac4 etc } } // end of class UniqueCodeTest // end of file UniqueCodeTest.php
##Licence
@ MUTYALA ANANTHA LAKSHMAJI
lakshmajim/uniquecode 适用场景与选型建议
lakshmajim/uniquecode 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 224 次下载、GitHub Stars 达 4, 最近一次更新时间为 2016 年 04 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「otp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lakshmajim/uniquecode 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lakshmajim/uniquecode 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lakshmajim/uniquecode 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
OTP generating package
Alfabank REST API integration
Laravel package for Beem API integration - SMS, Airtime, OTP, Payment Checkout, Collections, Contacts, Moja, and International SMS services
Create and verify One Time Passwords based on Time and HMAC. May be used in 2FA (Two Factor Authentication), MFA (Multi factor Authentication), 2SA (Two Step Authentication) and MSA (Multi Step Authentication).
Laravel package for OTP validation with built-in features like retry and resend mechanism. Built in max retry and max resend blocking. OTP/Security Code can be send over SMS or Email of your choice with user-defined template.
Laravel package for Accurate Online API integration.
统计信息
- 总下载量: 224
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-21