11 lines
288 B
Plaintext
11 lines
288 B
Plaintext
|
|
protected static function init()
|
|
{
|
|
self::afterInsert(function ($row) {
|
|
if (!$row['{%order%}']) {
|
|
$pk = $row->getPk();
|
|
$row->getQuery()->where($pk, $row[$pk])->update(['{%order%}' => $row[$pk]]);
|
|
}
|
|
});
|
|
}
|