DiverseYouthNightSchool/application/admin/manystore_command/Crud/stubs/mixins/modelinit.stub

9 lines
228 B
Plaintext
Raw Normal View History

2024-11-04 15:00:20 +08:00
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['{%order%}' => $row[$pk]]);
});
}