yiier/yii2-hashids
最新稳定版本:v3.0.0
Composer 安装命令:
composer require yiier/yii2-hashids
包简介
Hashids for Yii2
README 文档
README
Installation
Install this package via Composer:
$ composer require yiier/yii2-hashids
Usage
configurate is as a component
In your main.php or web.php (dependences your yii2 project constructor):
[ 'hahsids' => [ 'class' => 'yiier\hashids\Hashids', //'salt' => 'your salt', //'minHashLength' => 5, //'alphabet' => 'abcdefghigk' ] ]
Also using this like this:
$hashids = Yii::createObject([ 'class' => 'yiier\hashids\Hashids' ]); $id = $hashids->encode(1, 2, 3); $numbers = $hashids->decode($id); var_dump($id, $numbers);
Test
$ phpunit
Lisence
统计信息
- 总下载量: 435
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-24