weigh == 0) { $pk = $model->getPk(); if (strlen($model[$pk]) >= 19) { $model->where($pk, $model[$pk])->update(['weigh' => $model->count()]); } else { $model->where($pk, $model[$pk])->update(['weigh' => $model[$pk]]); } } } }