Only override this method on Model
/**
* @param array $attributes
*
* @throws \Illuminate\Database\Eloquent\MassAssignmentException
* @return $this
*/
public function fill(array $attributes)
{
foreach ($attributes as $key => $values) {
if ($this->isKeyALocale($key)) {
$this->getTranslationOrNew($key)->fill($values);
unset($attributes[$key]);
} else {
list($attribute, $locale) = $this->getAttributeAndLocale($key);
if ($this->isTranslationAttribute($attribute) and $this->isKeyALocale($locale)) {
$this->getTranslationOrNew($locale)->fill([$attribute => $values]);
unset($attributes[$key]); // <- change here
}
}
}
return parent::fill($attributes);
}
To
...
$this->getTranslationOrNew($locale)->fill([$attribute => $values]);
if(!in_array($key, $this->fillable)) {
unset($attributes[$key]);
}
...