protected function getTranslationsRelation($query)
    {
        /** @var Builder $query */
        /** @var Model|Translatable $model */
        $model = $query->getModel();

        if ( ! method_exists($model, 'translations')) {
            // @codeCoverageIgnoreStart
            throw new RuntimeException('Model ' . get_class($model) . ' is not a translated model.');
            // @codeCoverageIgnoreEnd
        }

        return $model->translations();
    }
protected function getTranslationsRelation($query)
    {
        /** @var Builder $query */
        /** @var Model|Translatable $model */
        $model = $query->getModel();

        if ( ! method_exists($model, 'translations')) {
            // @codeCoverageIgnoreStart
            throw new RuntimeException('Model ' . get_class($model) . ' is not a translated model.');
            // @codeCoverageIgnoreEnd
        }

        return $model->translations();
    }
protected function getTranslationsRelation ( $ query ) { /** @var Builder $query */ /** @var Model|Translatable $model */ $ model = $ query -> getModel ( ) ; if ( ! method_exists ( $ model , 'translations' ) ) { // @codeCoverageIgnoreStart throw new RuntimeException ( 'Model ' . get_class ( $ model ) . ' is not a translated model.' ) ; // @codeCoverageIgnoreEnd } return $ model -> translations ( ) ; }
Returns relation instance for translations.

@param Builder $query
@return \Illuminate\Database\Eloquent\Relations\HasMany
Returns relation instance for translations .