diff --git a/addons/default/visiosoft/advs-module/src/Support/_helpers.php b/addons/default/visiosoft/advs-module/src/Support/_helpers.php index 45c94b635..f5f0bc714 100644 --- a/addons/default/visiosoft/advs-module/src/Support/_helpers.php +++ b/addons/default/visiosoft/advs-module/src/Support/_helpers.php @@ -31,4 +31,16 @@ if (!function_exists('auth_id_if_null')) function auth_id_if_null($userId) { return $userId ?: auth()->id(); } +} + +if (!function_exists('replace_to_text')) +{ + function replace_to_text($content, $array) + { + foreach ($array as $key => $value) { + $content = str_replace('${' . $key . '}', $value, $content); + } + + return $content; + } } \ No newline at end of file