ignatenkovnikita/yii2-activerecord-history-widget

ActiveRecord 历史控件

v1.1 2022-11-29 08:30 UTC

This package is auto-updated.

Last update: 2024-08-29 04:25:50 UTC


README

ActiveRecord 历史控件

此控件使用扩展 nhkey/yii2-activerecord-history

安装

安装此扩展的首选方式是通过 composer

运行以下命令之一:

php composer.phar require --prefer-dist ignatenkovnikita/yii2-activerecord-history-widget:dev-master

"ignatenkovnikita/yii2-activerecord-history-widget": "dev-master"

将以下内容添加到您的 composer.json 文件的 require 部分中。

在模型中添加行为,请参阅 说明

使用方法

扩展安装完成后,只需在代码中使用即可

<?= \ignatenkovnikita\arh\ActiveRecordHistoryWidget::widget(['model' => $model]); ?>

模型必须实现 ModelHistoryInterface 接口