在backend/modules/test/models/TestSearch.php中
配置好search方法,根据需求来确定字段搜索是like还是=或者其他。...hearttrait', 'common', 'nacs', 'attack'], 'string', 'max' => 500]
];
}
或者我们用behaviors来实现一些字段的数据的自动化填充...behaviors\BlameableBehavior',
'createdByAttribute' => 'created_by',//create时,created_by字段的值会自动填充为当前操作用户的...behaviors\TimestampBehavior',
'attributes' => [
//insert数据库前datetime的值会自动填充为当前的时间戳...behaviors\BlameableBehavior',
'createdByAttribute' => 'created_by',//create时,created_by字段的值会自动填充为当前操作用户的