attributes) ? $this->attribute[$locale_fld] ?: $name : $name; return $name; } public function getTitleAttribute($title) { $locale_fld = 'title_' . \Lang::getLocale(); $title = array_key_exists($locale_fld, $this->attributes) ? $this->attribute[$locale_fld] ?: $title : $title; return $title; } public function getUrlAttribute($url) { $locale_fld = 'url_' . \Lang::getLocale(); $url = array_key_exists($locale_fld, $this->attributes) ? $this->attribute[$locale_fld] ?: $url : $url; return $url; } }