diff --git a/library/think/console/command/Make.php b/library/think/console/command/Make.php index 6dd754c7..2829ee3c 100644 --- a/library/think/console/command/Make.php +++ b/library/think/console/command/Make.php @@ -58,7 +58,7 @@ abstract class Make extends Command mkdir(strtolower(dirname($pathname)), 0755, true); } - file_put_contents($pathname, $this->buildClass($name)); + file_put_contents($pathname, $this->buildClass($classname)); $output->writeln('' . $this->type . ' created successfully.'); diff --git a/library/think/console/command/make/stubs/controller.stub b/library/think/console/command/make/stubs/controller.stub index 70c30c34..870ce5cf 100644 --- a/library/think/console/command/make/stubs/controller.stub +++ b/library/think/console/command/make/stubs/controller.stub @@ -3,6 +3,7 @@ namespace {%namespace%}; use think\Controller; +use think\Request; class {%className%} extends Controller {