mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
改进Route类的import方法
This commit is contained in:
@@ -162,10 +162,10 @@ class Route
|
|||||||
if (is_numeric($key)) {
|
if (is_numeric($key)) {
|
||||||
$key = array_shift($val);
|
$key = array_shift($val);
|
||||||
}
|
}
|
||||||
|
if (empty($val)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (0 === strpos($key, '[')) {
|
if (0 === strpos($key, '[')) {
|
||||||
if (empty($val)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$key = substr($key, 1, -1);
|
$key = substr($key, 1, -1);
|
||||||
$result = ['routes' => $val, 'option' => [], 'pattern' => []];
|
$result = ['routes' => $val, 'option' => [], 'pattern' => []];
|
||||||
} elseif (is_array($val)) {
|
} elseif (is_array($val)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user