yurichandra/maker
Composer 安装命令:
composer require yurichandra/maker
包简介
A voucher maker works for PHP.
README 文档
README
A voucher generator that works for PHP.
Features
- Generate with length specified.
- Generate with four base string. ex: kmol
- Generate with eight base string. ex: kqolemdc
- Generate with prefix and/or suffix
- Different type of character base.
How to install
composer require yurichandra/maker
How to use
$maker = new Maker(['type' => 'lowercase']);
You can define which type of character that you want to use to generate voucher string.
Types available
- lowercase ex: qmndbtkq
- uppercase ex: QMNDBTKQ
- number ex: 98109182
- mixed ex: ik12ERkd
//Prefix $maker = new Maker([ 'type' => 'lowercase' 'prefix' => 'TKP-' ]); // Suffix $maker = new Maker([ 'type' => 'lowercase' 'prefix' => '-CTP' ]);
You also can define the prefix or suffix in Maker constructor.
//Generate method $vouchers = $maker->generate($length_of_character, $amount_of_vouchers) //Generate six base method $vouchers = $maker->generateSixBase($amount_of_vouchers) //Generate method $vouchers = $maker->generateEightBase($amount_of_vouchers)
Thank you.
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-06