From 53f9dcf1c76140854d835ff39328d69979516dc9 Mon Sep 17 00:00:00 2001 From: monkenWu <610877102@mail.nknu.edu.tw> Date: Tue, 10 Mar 2020 13:15:11 +0800 Subject: [PATCH] Select Model File Table bug fix --- src/Commands/CliCreate.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Commands/CliCreate.php b/src/Commands/CliCreate.php index 73de0cf..ec48ac2 100644 --- a/src/Commands/CliCreate.php +++ b/src/Commands/CliCreate.php @@ -228,11 +228,12 @@ public static function getAllNamespace(String $appPath,String $type){ $nowDir = $key; foreach ($map as $key => $value) { if(gettype($key) != "integer"){ - $getDeepMap($map,"{$nowDir}{$key}",$nameArr); + $getDeepMap($value,"{$nowDir}{$key}",$nameArr); + }else{ + $path = $nowDir.str_replace(".php","",$value); + $path = str_replace("/","\\",$path); + $nameArr[] = $path; } - $path = $nowDir.str_replace(".php","",$value); - $path = str_replace("/","\\",$path); - $nameArr[] = $path; } };