Browse Source

Update ConfigCacheService, fix db issue

Daniel Supernault 4 năm trước cách đây
mục cha
commit
d2cb7d4770

+ 4 - 0
app/Services/ConfigCacheService.php

@@ -44,6 +44,10 @@ class ConfigCacheService
 				'uikit.show_custom.js'
 				'uikit.show_custom.js'
 			];
 			];
 
 
+			if(!config('instance.enable_cc')) {
+				return config($key);
+			}
+
 			if(!in_array($key, $allowed)) {
 			if(!in_array($key, $allowed)) {
 				return config($key);
 				return config($key);
 			}
 			}

+ 2 - 0
config/instance.php

@@ -72,4 +72,6 @@ return [
 			'org' => env('COVID_LABEL_ORG', 'visit the WHO website')
 			'org' => env('COVID_LABEL_ORG', 'visit the WHO website')
 		]
 		]
 	],
 	],
+
+	'enable_cc' => env('ENABLE_CONFIG_CACHE', false)
 ];
 ];