yudhatp/laravel-activity-logs 问题修复 & 功能扩展

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

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

yudhatp/laravel-activity-logs

最新稳定版本:0.0.4

Composer 安装命令:

composer require yudhatp/laravel-activity-logs

包简介

Simple Activity Log for Laravel

README 文档

README

Simple and Usefull Activity Log for Laravel.

Installation

You can install the package via composer:

composer require yudhatp/laravel-activity-logs

You can publish and run the migrations with:

php artisan migrate

You can publish config file with:

php artisan vendor:publish --tag=yudhatp-activity-logs-config

Usage

Auto Logging

on "kernel.php", add this line on your "protected $middlewareGroups"

'web' => [
    ...
    \Yudhatp\ActivityLogs\Middleware\ActivityLogMiddleware::class,
    ...
],

in the config file, you can determine what data will be stored in "user_id". at default, the data that will be stored is the "id" field but you can manually change this at "user" data. for example :

'user' => 'employee_id'

Manual Logging

on your controller, write this code :

use Yudhatp\ActivityLogs\ActivityLogs;
ActivityLogs::log(auth()->user()->id, $request->ip(), 'Profile', 'View/Edit Profile');

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-26