src/models/HCMultiLanguageModel.php
public function translation()
    {
        if (is_null($this->translationsClass))
            $this->translationsClass = get_class($this) . 'Translations';

        return $this->hasOne($this->translationsClass, 'record_id', 'id')->where('language_code', app()->getLocale());
    }
public function translation()
    {
        if (is_null($this->translationsClass))
            $this->translationsClass = get_class($this) . 'Translations';

        return $this->hasOne($this->translationsClass, 'record_id', 'id')->where('language_code', app()->getLocale());
    }
public function translation ( ) { if ( is_null ( $ this -> translationsClass ) ) $ this -> translationsClass = get_class ( $ this ) . 'Translations' ; return $ this -> hasOne ( $ this -> translationsClass , 'record_id' , 'id' ) -> where ( 'language_code' , app ( ) -> getLocale ( ) ) ; }
Single translation only

@return \Illuminate\Database\Eloquent\Relations\HasOne
Single translation only