modeAfterInsert.stub 226 B

12345678
  1. protected static function onAfterInsert($model)
  2. {
  3. if ($model->weigh == 0) {
  4. $pk = $model->getPk();
  5. $model->where($pk, $model[$pk])->update(['{%order%}' => $model[$pk]]);
  6. }
  7. }