fixwa/tiny-uuid
Composer 安装命令:
composer require fixwa/tiny-uuid
包简介
This library generates a short alphanumeric unique ID.
README 文档
README
Generates a Random "Mixed Case" string of the specified length consisting only of numbers and letters, e.g: crkeG, zL6VY, etc.
This utility can be used to generate an alphanumeric ID for URLs when you don't want visitors to know the internals of your database (the ID of a record), and instead a random ID will be exposed.
For example:
Having this URL: http://www.example.com/product/123 we can change to: http://www.example.com/product/Krd2G
Usage
Add the library as a dependency:
$ composer require fixwa/tiny-uuid
Then in your code you would call it like the following:
<?php
...
use Fixwa\TinyUuid\TinyUuid;
...
$tinyId = TinyUuid::tinyUuid();
Development
Run unit tests
$ vendor/bin/phpunit -c tests/
统计信息
- 总下载量: 50
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-12