Commit b1c6d698 authored by 梁俊杰's avatar 梁俊杰

自动生成命令:修复获取所有入参方法错误

parent 88061157
...@@ -601,7 +601,7 @@ class MakeModelCommand extends HyperfCommand ...@@ -601,7 +601,7 @@ class MakeModelCommand extends HyperfCommand
$content = file_get_contents($stubFile); $content = file_get_contents($stubFile);
$info = $this->currentTableStructure; $info = $this->currentTableStructure;
//列表 //列表
$list = "\$conditions = \$this->request->inputs();\n"; $list = "\$conditions = \$this->request->all();\n";
$list .= "\t\t\$list = \$this->model->where(function (\$q) use (\$conditions) {\n"; $list .= "\t\t\$list = \$this->model->where(function (\$q) use (\$conditions) {\n";
foreach ($info['fields'] as $v) { foreach ($info['fields'] as $v) {
if (Str::endsWith($v['column_name'], "_id")) { if (Str::endsWith($v['column_name'], "_id")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment