From a84b1488ea7d98b0ec55b611b514bd5ba1f51b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Thu, 6 Aug 2020 22:11:12 +0300 Subject: [PATCH] Added cache_prefix function for cache system --- app/Utilities/helpers.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Utilities/helpers.php b/app/Utilities/helpers.php index 7ba73c658..59d7b0776 100644 --- a/app/Utilities/helpers.php +++ b/app/Utilities/helpers.php @@ -54,3 +54,14 @@ if (!function_exists('show_widget')) { return Widgets::show($model, ...$arguments); } } + +if (!function_exists('cache_prefix')) { + /** + * Cache system added company_id prefix. + * + * @return string + */ + function cache_prefix() { + return session('company_id') . '_'; + } +}