修复代码生成器bug

This commit is contained in:
yanwenwu
2020-05-20 11:03:21 +08:00
parent 181ceefd55
commit ff1d7dfd2e
3 changed files with 15 additions and 8 deletions

View File

@@ -100,8 +100,13 @@ class Generator
'other_function' => $params['controller']['other_function'],
];
$table = $params['controller']['table'] ?? '';
if ($table) {
$table = \config('database.connections.mysql.prefix') . $table;
}
$model = [
'table' => $params['controller']['table'] ?? '',
'table' => $table,
'model' => $params['controller']['model'] ?? '',
'sql' => $params['model']['data'],
'extra' => $params['model']['extra'],