forex-formula/yii2-log 问题修复 & 功能扩展

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

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

forex-formula/yii2-log

Composer 安装命令:

composer require forex-formula/yii2-log

包简介

Package

README 文档

README

Installation

The preferred way to install this extension is through composer.

Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json. Either run

$ php composer.phar require pvsaintpe/yii2-log "5.*"

or add

"pvsaintpe/yii2-log": "5.*"

to the require section of your composer.json file.

Additional information

All base models and query must be inherited from:

ActiveRecord extends \pvsaintpe\log\components\ActiveRecord ActiveQuery extends \pvsaintpe\log\components\ActiveQuery

To track changes, add to your model:

/**
 * @return bool
 */
public static function logEnabled()
{
    return true;
}

Build project

Every time when you change the database schema to be logged, run the command:

#!/usr/bin/env bash
php ./yii changelog/generate
php ./yii changelog/migrate --interactive=0

Customization

  1. To access the visual part, for example, to view revisions and change history of your data, add to the config:
// backend/configs/main.php
return [
    'modules' => [
        'changelog' => [
            'class' => 'pvsaintpe\log\Module',
        ],
    ]
];
  1. To fine-tune the logging system, use the configurator. For a complete list of available options, see pvsaintpe\log\components\Configs:
// common/configs/params.php
return [
    'changelog.configs' => [
        'db' => 'dbLog', // DB Storage for Log-tables
        'storageDb' => 'db', // DB Storage for Data-tables
        'adminTable' => 'admin', // Table Name for Admin's
        'tablePrefix' => '_log',
        'adminColumn => 'updated_by',
    ],
];

Usage

To activate all features of the component, use pvsaintpe\log\traits\SearchTrait in your Search-models. It is recommended to keep the log data in a separate database, although you are not limited in this.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固