Download the PHP package wadywh/operation-log without Composer

On this page you can find all versions of the php package wadywh/operation-log. 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 operation-log

支持 Laravel 的 ORM 与 ThinkPHP 的 ORM 。可以生成增、删、改,包括批量增、删、改,以及 使用 DB 操作的日志。

因为批量操作没有触发模型事件,使用模型事件无法覆盖所有模型对数据库的操作以及 DB 操作,所以通过获取器,自动生成可读性高的操作日志。

安装

composer require wadywh/operation-log

Laravel 使用

首先在数据库的配置文件 config/database.php 中增加两个配置项 modelNamespacelogKey,如果项目通过注入表模型映射关系来确定模型命名空间,可不配置 modelNamespace

ThinkPHP 使用

在数据库的配置文件 config/database.php 中增加三个配置项 querymodelNamespacelogKey

然后注册 MySQL 数据库连接的解析器。

注入表模型映射关系(可选),如果没有配置映射关系且数据库配置没有配置modelNamespace则生成默认的基础模型。

配置不查information_schema库(可选),部分业务场景中是没有此库的查询权限的,可根据实际业务场景进行配置。

日志主键

可在模型中设置$logKey属性修改需要记录的主键名称。

可读性设置

通过表注释、字段注释与获取器来生成可读性的日志。

表注释与字段注释

可使用表自身注释和字段自身注释(前提是允许查询information_schema库且有查询权限),也可以在模型中通过$tableComment$columnComment设置表注释与字段注释(优先级最高)。

获取器

设置一个名为字段名_text的获取器。

模型单独设置不记录日志

可在模型中设置$notRecordLog = true属性,该数据表的变更则不会生成操作日志。

获取日志集合信息

清除日志集合信息

注入表模型命名空间映射关系

设置不查information_schema库

设置允许记录的操作类型

设置程序运行结束调用的方法


All versions of operation-log with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
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 wadywh/operation-log contains the following files

Loading the files please wait ....