PHP code example of qingbing / pf-abstracts-operate-log

1. Go to this page and download the library: Download qingbing/pf-abstracts-operate-log library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

qingbing / pf-abstracts-operate-log example snippets


class TestOperateLog extends OperateLog
{
    /* @var string 数据表名,todo 需要在子类中自行指定 */
    protected $tableName = 'log_operate_template';

    public function init()
    {
        parent::init();
        // todo,如果有登录用户,建议在该方法中赋值指定
//        $this->user = '';
    }
}

\Test\TestOperateLog::getInstance()->operate(true, 'type', 'message', 'key', ['content' => 'xx']);