From 64ecdae57296829d20e48d12f1c475aa91168cc0 Mon Sep 17 00:00:00 2001 From: Alaa m ebrahim Date: Fri, 13 Nov 2020 18:40:21 +0200 Subject: [PATCH] fix: changed config to cache --- src/LaravelTranslationsServiceProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LaravelTranslationsServiceProvider.php b/src/LaravelTranslationsServiceProvider.php index 895a1d1..b982091 100644 --- a/src/LaravelTranslationsServiceProvider.php +++ b/src/LaravelTranslationsServiceProvider.php @@ -31,9 +31,9 @@ private function registerConfig() protected function registerBladeDirective() { - Cache::remember('translations', cache('ame-translations.cache_ttl'), function () { + Cache::remember('translations', config('ame-translations.cache_ttl'), function () { $translations = collect(); - foreach (config('ame-translations.supported-locales') as $locale) { // suported locales + foreach (config('ame-translations.supported-locales') as $locale) { // supported locales $translations[$locale] = [ 'php' => $this->phpTranslations($locale), 'json' => $this->jsonTranslations($locale), @@ -44,7 +44,7 @@ protected function registerBladeDirective() }); Blade::directive('translations', function () { - return ''; + return ''; }); }