优化代码生成
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
namespace catcher\generate\factory;
|
||||
|
||||
use catcher\CatchAdmin;
|
||||
use think\facade\Db;
|
||||
|
||||
abstract class Factory
|
||||
{
|
||||
@@ -81,4 +82,17 @@ abstract class Factory
|
||||
|
||||
return [$className, $namespace];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @time 2020年04月28日
|
||||
* @param $table
|
||||
* @return bool
|
||||
*/
|
||||
protected function hasTableExists($table)
|
||||
{
|
||||
$tables = Db::getConnection()->getTables();
|
||||
|
||||
return in_array($table, $tables);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user