refactor: 修改array_flatten函数相关
This commit is contained in:
@@ -104,6 +104,18 @@ if (!function_exists('array_to_tree')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('array_flatten')) {
|
||||
/**
|
||||
* 将多维数组转换为一维数组
|
||||
* @param array $array
|
||||
* @return array
|
||||
*/
|
||||
function array_flatten(array $array, int $depth = 1): array
|
||||
{
|
||||
return \think\helper\Arr::flatten($array, $depth);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('thumb')) {
|
||||
/**
|
||||
* 获取缩略图
|
||||
|
||||
Reference in New Issue
Block a user