refactor(curd): optimize relation binding and code generation

- Move relation binding logic from model constructor to controller
- Generate controller code for binding select fields-Remove unnecessary code and templates
- Improve code readability and maintainability
This commit is contained in:
wolfcode
2024-12-20 17:09:04 +08:00
parent 5d58248cf4
commit 55a9b13e69
4 changed files with 29 additions and 30 deletions

View File

@@ -168,6 +168,12 @@ class Curd extends Command
}
}
}
if (PHP_SAPI == 'cli') {
$output->info(">>>>>>>>>>>>>>>");
$output->info('执行成功');
}else {
$output->writeln('执行成功');
}
}catch (\Exception $e) {
if (PHP_SAPI == 'cli')
CliEcho::error($e->getMessage());