afaanbilal/laravel-has-uuid
最新稳定版本:0.1.3
Composer 安装命令:
composer require afaanbilal/laravel-has-uuid
包简介
Autogenerate UUIDs for your Models on insert and set the route-model-binding key to uuid.
README 文档
README
Author: Afaan Bilal
Introduction
Laravel HasUUID is a package for Laravel to autogenerate UUIDs for your Models on insert and set the route-model-binding key to uuid.
Also adds a fromUUID method to your Model which accepts a uuid and returns a model instance if found, or null otherwise.
Please make sure that you have column in your table called uuid which is a unique index.
Example (in migration):
$table->string('uuid')->unique();
Installation
composer require afaanbilal/laravel-has-uuid
Usage
// In any model: use AfaanBilal\LaravelHasUUID\HasUUID; // ... class Post extends Model { use HasUUID; // ... }
Contributing
All contributions are welcome. Please create an issue first for any feature request or bug. Then fork the repository, create a branch and make any changes to fix the bug or add the feature and create a pull request. That's it! Thanks!
License
Laravel HasUUID is released under the MIT License. Check out the full license here.
统计信息
- 总下载量: 1.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-23