diff --git a/src/axm_helper.php b/src/axm_helper.php index 29fddda..f07ecb7 100644 --- a/src/axm_helper.php +++ b/src/axm_helper.php @@ -278,23 +278,10 @@ function randomId($size = 50) */ function lang(string $key, array $args = []) { - // Get the message translation using the provided key. - // $message = Lang::gettext($key); - - // // Check if multiple parameters are passed. - // if (func_num_args() > 1) { - // $args = func_get_args(); - // unset($args[0]); - // // Replace placeholders in the message using vsprintf. - // $message = vsprintf($message, $args); - // } - - // return $message; - // Get an instance of Lang $lang = Lang::make(); - if (emty($args)) { + if (empty($args)) { return $lang->trans('file.message'); } @@ -364,6 +351,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')) { /**