diff --git a/extend/catcher/command/Tools/MakeMenuCommand.php b/extend/catcher/command/Tools/MakeMenuCommand.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/extend/catcher/command/Tools/MakeMenuCommand.php @@ -0,0 +1 @@ +getTables(); - return in_array($table, $tables); + return in_array(\config('database.connections.mysql.prefix') . $table, $tables); } } \ No newline at end of file diff --git a/extend/catcher/generate/factory/SQL.php b/extend/catcher/generate/factory/SQL.php index 99b960f..37bb078 100644 --- a/extend/catcher/generate/factory/SQL.php +++ b/extend/catcher/generate/factory/SQL.php @@ -36,9 +36,7 @@ class SQL extends Factory throw new FailedException('table name has lost~'); } - $table = \config('database.connections.mysql.prefix') . $params['table']; - - if ($this->hasTableExists($table)) { + if ($this->hasTableExists($params['table'])) { throw new FailedException(sprintf('table [%s] has existed', $params['table'])); }