/** * Update an existing translation record based on the data provided. * * @param Translatable $model * @param $language * @param $field * @param $value * @return null|Translation * @throws TranslationNotFound */ public function update(Translatable $model, $language, $field, $value) { $translation = $this->findForUpdate($model, $language, $field); if (is_null($translation)) { throw new TranslationNotFound(); } $translation->value = $value; $this->translations->save($translation); return $translation; }