eloquent-hashids:自动为新创建的口才模型生成并保留Hashids

时间:2021-05-11 06:49:41
【文件属性】:
文件名称:eloquent-hashids:自动为新创建的口才模型生成并保留Hashids
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-11 06:49:41
laravel hashids eloquent PHP Laravel的口才Hashids 使用Ivan Akimov的在新创建的模型上自动保留Hashids。 当您需要生成唯一的字母数字(或任何其他字符)组合来表示模型时,这很有用。 安装 使用composer要求软件包。 composer require matt-daneshvar/eloquent-hashids 用法 在迁移中,将可空的hashid列添加到数据库表中。 $ table -> string ( 'hashid' )-> nullable (); 使用Hashid特征自动生成并持续Hashids为您的新车型。 (可选)使用HashidRouting设置模型,以将hashid列用于Laravel的 。 use Illuminate \ Database \ Eloquent \ Model ; use MattDaneshvar \ EloquentHashids
【文件预览】:
eloquent-hashids-master
----src()
--------Hashid.php(3KB)
--------HashidRouting.php(298B)
----LICENSE.md(1KB)
----composer.json(923B)
----README.md(4KB)

网友评论