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

自动路由问题修复

parent 5bb6cc3c
...@@ -786,7 +786,7 @@ class MakeModelCommand extends HyperfCommand ...@@ -786,7 +786,7 @@ class MakeModelCommand extends HyperfCommand
if ($routes) { if ($routes) {
foreach ($routes as $v) { foreach ($routes as $v) {
$r = Str::snake($v); $r = Str::snake($v);
$content .= "\n\t\tRouter::get('/$r', 'App\Controller\\" . $modelClass . "Controller@$v');"; $content .= "\n\t\tRouter::get('/$r/\{id\}', 'App\Controller\\" . $modelClass . "Controller@$v');";
} }
} }
$content .= "\n\t});"; $content .= "\n\t});";
......
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