src/Models/Database/Category.php
public function getTranslation($languageId = null)
    {
        $languageId = request()->get('language_id');
        if (null === $languageId) {
            return $this;
        } else {
            return $this->translations()->whereLanguageId($languageId)->first();
        }  
    }
public function getTranslation($languageId = null)
    {
        $languageId = request()->get('language_id');
        if (null === $languageId) {
            return $this;
        } else {
            return $this->translations()->whereLanguageId($languageId)->first();
        }  
    }
public function getTranslation ( $ languageId = null ) { $ languageId = request ( ) -> get ( 'language_id' ) ; if ( null === $ languageId ) { return $ this ; } else { return $ this -> translations ( ) -> whereLanguageId ( $ languageId ) -> first ( ) ; } }
Category Model Get Translation Model and return the value
@return \Illuminate\Database\Eloquent\Relations\HasMany
Category Model Get Translation Model and return the value