hexathos/laravel-hasuserdata
最新稳定版本:v0.1.0
Composer 安装命令:
composer require hexathos/laravel-hasuserdata
包简介
Autofills updated_by, created_by, updated_at and created_at
README 文档
README
About
This package automaticly adds username to models that have the Hexathos\Traits\HasUserData trait while creating or updating a Model.
It requires string-able fields "created_by" and "updated_by" in your database.
How to install
Require the package:
$ composer require hexathos/laravel-hasuserdata
Create a migration that adds created_by and updated_by fields to your models table
Include the Namespace in your Model and add the trait
namespace App\Models;
use Hexathos\Traits\HasUserData;
/* .snipped. */
use HasUserData;
That's it.
统计信息
- 总下载量: 207
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-07