/** * Creates a new translation for a given translatable model, saving the language, field and value. * * @param Translatable $model * @param $language * @param $field * @param $value * @return mixed */ public function create(Translatable $model, $language, $field, $value) { $translation = $this->translations->getNew(); $translation->language = $language; $translation->field = $field; $translation->value = $value; $translation->resource = $model->getResourceName(); $translation->foreignId = $model->getId(); $this->translations->save($translation); return $translation; }