定制 syberisle/laravel-scribe 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

syberisle/laravel-scribe

最新稳定版本:0.0.2

Composer 安装命令:

composer require syberisle/laravel-scribe

包简介

Tool for adding logging to models

关键字:

README 文档

README

Latest Version on Packagist GitHub Workflow Status Total Downloads

An opinionated package that provides easy to use functions to log diagnostic information against the models in your app. These logs are stored in their own tables.

If you are looking for automatic event logging on your models, please look at either spatie/laravel-activitylog or owen-it/auditable as they are better suited for an audit log.

You can use it like this:

SomeModel::find(1)->log('hi there');

// retrieving model logs
SomeModel::find(1)->logs();
// or
SomeModelLogs::all();

Installation

composer install syberisle/laravel-scribe

You can then create log models for your existing models:

php artisan make:scribe:model 'App\Models\SomeModel'

Note: This automatically creates the migration for the log model, you may specify --no-migration if you do not want the migration to be auto-generated.

You will also need to update your model to get the logs(), and log() methods.

use SyberIsle\Laravel\Scribe\Model\HasLogs;

class MyModel
{
    use HasLogs;
    
    protected $logModel = MyModelLog::class
    ...
}

UUID support

UUID's are supported for the migrations:

  • --uuid will cause the migration & generated Log class to use UUID's via the HasUuids trait
  • --causer-uuid will cause the migration to utilize UUID's when creating the causer columns
  • The subject ID will be auto-detected by the Model generator, and will apply UUID's if necessary to the subject_id

Changelog

Please see CHANGELOG for more information about recent changes.

Contributing

Please see CONTRIBUTING for details.

Security

If you've found a bug regarding security please report it via the security tab of this repository.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固