Download the PHP package nexusbrother/laravel-admin-operation-log-statistic without Composer

On this page you can find all versions of the php package nexusbrother/laravel-admin-operation-log-statistic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-admin-operation-log-statistic

Laravel Admin Operation Log Statistic

项目介绍

Laravel Admin Operation Log Statistic 是一个为 laravel-admin 框架开发的操作日志统计扩展包。它可以自动统计后台用户的操作日志,提供直观的数据报表,并在操作频率异常时发送警告通知。

功能特性

安装

1. 安装依赖

使用 Composer 安装扩展包:

2. 发布配置和迁移文件

3. 运行迁移

4. 配置环境变量

在 .env 文件中添加以下配置:

配置说明

扩展包的配置文件位于 config/admin.php,主要配置项如下:

使用

1. 查看统计报表

安装完成后,在 laravel-admin 后台可以看到「操作日志统计」菜单,点击进入即可查看统计报表。

统计报表支持以下筛选条件:

2. 定时任务

扩展包会自动注册一个每日执行的定时任务,用于统计前一天的操作日志。确保你的 Laravel 应用已经配置了定时任务:

3. 手动执行统计

如果需要手动执行统计任务,可以使用以下命令:

数据结构

统计数据表 admin_operation_log_statistics

字段名 类型 描述
id bigint 主键
date date 统计日期
user_id bigint 用户ID
company_id bigint 公司ID(可选)
total int 当日操作总数
top_num int 最频繁操作的次数
top_path string 最频繁操作的路径
created_at timestamp 创建时间
updated_at timestamp 更新时间

注意事项

  1. 确保 laravel-admin 已经安装并配置完成
  2. 确保操作日志表 admin_operation_logs 存在
  3. 定时任务需要正常运行才能自动统计
  4. 邮件通知功能需要配置正确的通知服务

代码质量检查

本项目集成了完整的代码质量检查工具,确保代码的规范性和稳定性。

本地运行代码质量检查

使用以下命令在本地运行完整的代码质量检查:

GitHub Actions 工作流

项目配置了 GitHub Actions 工作流,会在每次推送和拉取请求时自动运行代码质量检查:

工作流配置文件位于 .github/workflows/code-quality.yml。

项目结构

贡献

欢迎提交 Issue 和 Pull Request!

贡献指南

  1. 确保你的代码符合项目的代码风格规范
  2. 运行本地代码质量检查确保没有问题
  3. 提交 Pull Request 前确保所有检查通过

许可证

MIT License


All versions of laravel-admin-operation-log-statistic with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
laravel/framework Version >=5.5
encore/laravel-admin Version ^1.8.19
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nexusbrother/laravel-admin-operation-log-statistic contains the following files

Loading the files please wait ...