😀 优化URL方法

Signed-off-by: 逆天的蝈蝈 <632522043@qq.com>
This commit is contained in:
逆天的蝈蝈
2022-09-07 01:38:54 +00:00
committed by Gitee
parent f6aee95cfc
commit 065fc5f760

View File

@@ -84,6 +84,8 @@ if (!function_exists('url')) {
if (!Str::startsWith($url, '/')) {
$url = DIRECTORY_SEPARATOR . $url;
}else{
return $url . $vars;
}
return $app == 'index' ? $url . $vars : '/' . $app . $url . $vars;