diff --git a/src/template/impl/ControllerAutoMake.php b/src/template/impl/ControllerAutoMake.php index 4f7f479..6f27280 100644 --- a/src/template/impl/ControllerAutoMake.php +++ b/src/template/impl/ControllerAutoMake.php @@ -64,6 +64,9 @@ public function make($controller, $path, $table) $controllerTpl = dirname(dirname(__DIR__)) . '/tpl/baseController.tpl'; $tplContent = file_get_contents($controllerTpl); + + $tplContent = str_replace('', $namespace, $tplContent); + file_put_contents(App::getAppPath() . $filePath . DS . 'controller' . DS . 'Base.php', $tplContent); } } diff --git a/src/tpl/baseController.tpl b/src/tpl/baseController.tpl index eb67235..c97923e 100644 --- a/src/tpl/baseController.tpl +++ b/src/tpl/baseController.tpl @@ -1,6 +1,6 @@ controller; class Base extends \app\BaseController {