修复未定义table
This commit is contained in:
parent
64ce1243b4
commit
48f572168f
@ -93,6 +93,8 @@ abstract class Factory
|
||||
{
|
||||
$tables = Db::getConnection()->getTables();
|
||||
|
||||
return in_array(\config('database.connections.mysql.prefix') . $table, $tables);
|
||||
$table = \config('database.connections.mysql.prefix') . $table;
|
||||
|
||||
return in_array($table, $tables) ? $table : false;
|
||||
}
|
||||
}
|
@ -36,7 +36,7 @@ class SQL extends Factory
|
||||
throw new FailedException('table name has lost~');
|
||||
}
|
||||
|
||||
if ($this->hasTableExists($params['table'])) {
|
||||
if ($table = $this->hasTableExists($params['table'])) {
|
||||
throw new FailedException(sprintf('table [%s] has existed', $params['table']));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user