定制 kchinkesh/laravel-model-observer 二次开发

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

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

kchinkesh/laravel-model-observer

Composer 安装命令:

composer require kchinkesh/laravel-model-observer

包简介

A Simple Laravel Package to observe,log and anlaize any changes to Eloquent Model using trait.

README 文档

README

A Laravel Package to Log and analize all actions performed on a Eloquent Model.

Laravel Model Logger

Requirements

  • Laravel 7+
  • laravel/ui or laravel/breeze or jetstream for authentication purpose

Installation Instructions

  1. From Your Project's root Terminal run:
    composer require kchinkesh/laravel-model-observer
  2. Register the Package
    • Laravel 5.5 and up Uses package auto discovery feature, no need to edit the config/app.php file.
  3. Run the migration to add the table to record the activities to:
    php artisan migrate
    Note: If you want to specify a different table or connection make sure you update your .env file with the needed configuration variables.
  4. Optionally publish the packages views, config file, assets, and language files by running the following from your projects root folder:
    php artisan vendor:publish --tag=LaravelModelObserver

Usage

Trait Usage

Events can be recorded directly by using the trait inside your Model. To use the Trait:

  1. Include the call in the head of your model class file:
    use kchinkesh\LaravelModelObserver\App\Traits\ModelsObserver;
  2. Include the trait call in the opening of your model class:
    use ModelsObserver;

Routes

Model Activity Dashboard Routes

  • /actions
  • /actions/view/{id}

Screenshots

New Post

New Post

Posts

Posts

Edit Post

Edit Post

Model Logs

Logs

New Post Created Log

New

Post attributes change log

Change

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固