getLocale(); $localizedKey = 'name_' . $locale; if (in_array($localizedKey, $this->fillable)) { return $this->$localizedKey; } } if (strpos($key, 'description_localized') === 0) { $locale = app()->getLocale(); $localizedKey = 'description_' . $locale; if (in_array($localizedKey, $this->fillable)) { return $this->$localizedKey; } } return parent::__get($key); } }