getPk(); $model->where($pk, $model[$pk])->update(['weigh' => $model[$pk]]); } public function setComponentAttr($value) { if ($value) $value = str_replace('\\', '/', $value); return $value; } }