承接 tobidsn/laravel-userstamps 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tobidsn/laravel-userstamps

最新稳定版本:v5.0.1

Composer 安装命令:

composer require tobidsn/laravel-userstamps

包简介

A simple Laravel package for Eloquent Model user specific feilds.

README 文档

README

Laravel Userstamps is a simple Laravel package for your Eloquent Model user specific feilds. This package automatically inserts/updates an user id on your table on who created, last updated and deleted the record.

Install

  1. Add repositories in composer.json
"repositories": [
   {
     "url": "https://github.com/tobidsn/laravel-userstamps.git",

      "type": "git"
    }
 ],
  1. Add the package name in require with the branch name after the dev:
"tobidsn/laravel-userstamps": "dev-master"

Usage

Update your model's migration and add created_by, updated_by and deleted_by field using the userstamps() blueprint macro.

Schema::create('users', function (Blueprint $table) {
    $table->increments('id');
    $table->string('name', 100);
    $table->userstamps();
    $table->timestamps();
});

Then use UserstampsTrait on your model.

namespace App;

use Tobidsn\Userstamps\UserstampsTrait;

class User extends Model
{
    use UserstampsTrait;
}

Dropping columns

You can drop auditable columns using dropUserstamps() method.

Schema::create('users', function (Blueprint $table) {
    $table->dropUserstamps();
});

Original : https://github.com/hrshadhin/laravel-userstamps

And your done!

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固