承接 codefun/activitylog 相关项目开发

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

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

codefun/activitylog

最新稳定版本:v1.0.7

Composer 安装命令:

composer require codefun/activitylog

包简介

Laravel Activity Log

README 文档

README

  • This package will automatically Observe your Model class and track every data manupulation history like create, update, delete.
  • It will automatically store both record (Previous record and Current Record). Also it can show the diffrences between previous and updated record of Model information along with user record of who manupulated the data.

Installation Process

  • composer require codefun/activitylog
  • php artisan migrate
  • Optionally use: php artisan vendor:publish --tag=codefun_activity

Before Laravel 5.7

Add the following into your providers array on config\app.php:

  • CodeFun\Activitylog\App\Providers\ActivityServiceProvider

then add This alias into alias array on config\app.php:

  • "Activity" => CodeFun\Activitylog\Facade\Activity::class

Not necessary from Laravel 5.7 onwards

Publish Resource File

  • php artisan vendor:publish --tag=codefun_activity

By default codefun provides a basic blade file with bootstrap(v5) for viewing Activity Log and Log Details. You can to customize this blade page design by publishing the blade file. It can be located at resources/views/vendor/codefun/

How To Use?

Go to your Model and use the trait file:

use CodeFun\Activitylog\App\Component\Traits\ModelActivity;
class AnyModel extends Model
{
    use ModelActivity;
}

If you want to set custom message while data manipulation, override this method inside your model as shown:

use CodeFun\Activitylog\App\Component\Traits\ModelActivity;
class AnyModel extends Model
{
    use ModelActivity;

    public function getDescriptionForEvent($event_name) : string{
        return "Information has been ". $event_name; 
    }
}

How to Show Activity log Via Web Route and API Route

For API

  • http:://base_url/api/activity-log/list
  • http:://base_url/api/activity-log/view/{uuid}

For Web

  • http:://base_url/activity-log

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固