承接 tallesairan/activity-log 相关项目开发

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

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

tallesairan/activity-log

最新稳定版本:1.2

Composer 安装命令:

composer require tallesairan/activity-log

包简介

Activity Log for Backpack

README 文档

README

The Whole Fruit Manifesto

This package adds a web interface that shows the activity log for projects that use Backpack for Laravel. It relies on Spatie laravel-activitylog package, if you need further information on how to use it, head to https://spatie.be/docs/laravel-activitylog/.

How does it all work? Well:

  • when a change happens to an Eloquent model, the Spatie package will make a note of it in the database;
  • this package adds a web interface, so the admin can see the changes (aka activity log);

Preview

Don't belive how simple it is to use? Go ahead, try it right now, in our online demo. Edit some other entities, and check the activity logs page to see the changes.

Installation

Before official release, you need to add this to your composer.json's repositories section before you can install it, because the package hasn't been submitted to Packagist yet. This step should be removed before official release.

    {
        "type": "vcs",
        "url": "git@github.com:Laravel-Backpack/activity-log.git"
    }

In your Laravel + Backpack project:

# install the package
composer require backpack/activity-log

# publish and run the migrations
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations"
php artisan migrate

# optional: publish the config file
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-config"

# optional: add a sidebar entry item for the Activity Logs page
php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{ backpack_url('activity-log') }}'><i class='nav-icon la la-stream'></i> Activity Logs</a></li>"

Usage

Inside all the Models you want to be logged, add the usage of the LogsActivity Trait:

<?php

namespace App\Models;

use Backpack\CRUD\app\Models\Traits\CrudTrait;
+use Backpack\ActivityLog\Traits\LogsActivity;

class Article extends Model
{
    use CrudTrait;
+   use LogsActivity;
    ...

Customization

TODO: questions to answer:

  • What gets logged by default?
  • How do you customize what gets logged?
  • How do you customize the interface, if needed?

Security

If you discover any security related issues, please email cristian.tabacitu@backpackforlaravel.com instead of using the issue tracker.

Credits

License

This project was released under EULA, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.

统计信息

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

GitHub 信息

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

其他信息

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