Stevebauman\Translation\Translation::getCacheTranslation PHP Method

getCacheTranslation() protected method

Retrieves the cached translation from the specified locale and text.
protected getCacheTranslation ( Model $locale, string $text ) : boolean | Model
$locale Illuminate\Database\Eloquent\Model
$text string
return boolean | Illuminate\Database\Eloquent\Model
    protected function getCacheTranslation(Model $locale, $text)
    {
        $id = $this->getTranslationCacheId($locale, $text);
        $cachedTranslation = $this->cache->get($id);
        if ($cachedTranslation instanceof Model) {
            return $cachedTranslation;
        }
        // Cached translation wasn't found, let's return
        // false so we know to generate one.
        return false;
    }