cache = $cache; } public function loadTranslations(string $locale, string $group): array { $path = resource_path("lang/$locale/$group.yml"); return file_exists($path) ? $this->loadYaml($path) : []; } public function loadYaml(string $path): array { $key = 'yaml-trans-'.md5($path).'-'.filemtime($path); return $this->cache->rememberForever($key, function () use ($path) { return YamlParser::parseFile($path); }); } }