diff --git a/app/functions.php b/app/functions.php index c04270e..19d3453 100644 --- a/app/functions.php +++ b/app/functions.php @@ -120,8 +120,8 @@ if (!function_exists('get_route_remark')) { */ function get_route_remark(): string { - $controllerName = request()->controller(true); - $actionName = request()->action(true); + $controllerName = request()->controller; + $actionName = request()->action; $path = str_replace('.', '/', $controllerName); $remark = Db::name('admin_rule') @@ -268,7 +268,7 @@ if (!function_exists('action_in_arr')) { return false; } $arr = array_map('strtolower', $arr); - if (in_array(strtolower(request()->action()), $arr) || in_array('*', $arr)) { + if (in_array(strtolower(request()->action), $arr) || in_array('*', $arr)) { return true; } return false; @@ -390,7 +390,7 @@ if (!function_exists('ip_check')) { */ function ip_check($ip = null): void { - $ip = is_null($ip) ? request()->ip() : $ip; + $ip = is_null($ip) ? request()->ip : $ip; $noAccess = get_sys_config('no_access_ip'); $noAccess = !$noAccess ? [] : array_filter(explode("\n", str_replace("\r\n", "\n", $noAccess))); if ($noAccess && IpUtils::checkIp($ip, $noAccess)) {