Skip to content

Commit

Permalink
修复base命名空间问题
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jul 9, 2021
1 parent ba2c06c commit 62b6fc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/template/impl/ControllerAutoMake.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>', $namespace, $tplContent);

file_put_contents(App::getAppPath() . $filePath . DS . 'controller' . DS . 'Base.php', $tplContent);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tpl/baseController.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace app\controller;
namespace app<namespace>controller;

class Base extends \app\BaseController
{
Expand Down

0 comments on commit 62b6fc1

Please sign in to comment.