diff --git a/extend/catcher/CatchAdmin.php b/extend/catcher/CatchAdmin.php index 868e0d4..6f77b90 100644 --- a/extend/catcher/CatchAdmin.php +++ b/extend/catcher/CatchAdmin.php @@ -5,10 +5,11 @@ use think\helper\Arr; class CatchAdmin { - public const NAME = 'catch'; + public static $root = 'catch'; public const VERSION = '1.0.0'; + /** * * @time 2019年11月30日 @@ -16,7 +17,7 @@ class CatchAdmin */ public static function directory(): string { - return app()->getRootPath() . self::NAME . DIRECTORY_SEPARATOR; + return app()->getRootPath() . self::$root . DIRECTORY_SEPARATOR; } /** diff --git a/extend/catcher/command/CreateModuleCommand.php b/extend/catcher/command/CreateModuleCommand.php index 49c0aee..0ce7a69 100644 --- a/extend/catcher/command/CreateModuleCommand.php +++ b/extend/catcher/command/CreateModuleCommand.php @@ -64,7 +64,7 @@ class CreateModuleCommand extends Command $psr4 = $composer['autoload']['psr-4']; foreach ($psr4 as $namespace => $des) { - if ($des === CatchAdmin::NAME) { + if ($des === CatchAdmin::$root) { $this->namespaces = $namespace . $this->module . '\\'; break; }