diff --git a/src/axm_helper.php b/src/axm_helper.php index 74c8e11..f18ca1d 100644 --- a/src/axm_helper.php +++ b/src/axm_helper.php @@ -1,4 +1,5 @@ 1) { - $args = func_get_args(); - unset($args[0]); - // Replace placeholders in the message using vsprintf. - $message = vsprintf($message, $args); + if (empty($args)) { + return $lang->trans('file.message'); } - return $message; + // Translate a key + return $lang->trans('file.message', $args); } } @@ -352,6 +350,17 @@ function baseUrl(string $dir = ''): string } } +if (!function_exists('asset')) { + + function asset(string $dirFile): string + { + $pathAssets = 'resources/assets/'; + $file = baseUrl($pathAssets.$dirFile); + + return $file; + } +} + if (!function_exists('go')) { /**