coreproc/nova-auditing-user-fields 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

coreproc/nova-auditing-user-fields

最新稳定版本:0.2.0

Composer 安装命令:

composer require coreproc/nova-auditing-user-fields

包简介

A Laravel Nova field that works with the Laravel Auditing package to see who created or last updated a resource.

README 文档

README

Latest Version on Packagist Total Downloads

A Laravel Nova field that works with the Laravel Auditing package to see who created or last updated a resource.

nova auditing user fields screenshot

Installation

You can install the package in to a Laravel app that uses Laravel Nova and the Laravel Auditing package via composer:

composer require coreproc/nova-auditing-user-fields

Usage

Once installed, you can begin using the CreatedBy and UpdatedBy fields inside a resource.

Please take note that the model of the resource should be using the Auditable trait and implements the Auditable contract as explained in the Laravel Auditing package: http://laravel-auditing.com/docs/8.0/model-setup.

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use OwenIt\Auditing\Contracts\Auditable;

class User extends Model implements Auditable
{
    use \OwenIt\Auditing\Auditable;

    // ...
}

And in your resource:

<?php

use Coreproc\NovaAuditingUserFields\CreatedBy;
use Coreproc\NovaAuditingUserFields\UpdatedBy;
use Illuminate\Http\Request;

class User extends Resource
{
    // ...
    
    public function fields(Request $request)
    {
        return [
            // ...
            
            CreatedBy::make('Created By'),
            
            UpdatedBy::make('Updated By')->onlyOnDetail(),
            
            // ...
        ];
    }
}

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email chris.bautista@coreproc.ph instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 2
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固