ollico/laravel-uid
最新稳定版本:v6.0.0
Composer 安装命令:
composer require ollico/laravel-uid
包简介
A handy package to generate unique identifiers for Eloquent models
README 文档
README
A handy little Laravel compatible package that creates unique identifiers like u5CVsCnxyXg for your Eloquent models.
Installation
Require this package
composer require ollico/uid
Usage
Configuration
Database
Add the $table->uid() in your Schemas:
Schema::create('your_table', function (Blueprint $table) {
$table->uid();
})
Eloquent
Add the HasUid trait to your Models to add the capabilities:
- Local scope
$model->uid($uid) - Automatic generation of
uidduring thecreatingevent
Good to know
We utilise HashIds under the hood.
统计信息
- 总下载量: 10.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-25