diff --git a/catchAdmin/CatchAdminService.php b/catchAdmin/CatchAdminService.php index 7809200..18044e6 100644 --- a/catchAdmin/CatchAdminService.php +++ b/catchAdmin/CatchAdminService.php @@ -6,6 +6,7 @@ use catchAdmin\permissions\OperateLogListener; use catchAdmin\permissions\PermissionsMiddleware; use catchAdmin\system\event\LoginLogEvent; use catchAdmin\system\event\OperateLogEvent; +use catchAdmin\user\Auth; use catcher\command\BackupCommand; use catcher\command\InstallCommand; use catcher\command\MigrateRunCommand; @@ -26,12 +27,12 @@ class CatchAdminService extends Service */ public function boot() { - $this->registerCommands(); $this->registerValidates(); $this->registerMiddleWares(); $this->registerEvents(); $this->registerListeners(); + $this->registerClassAlias(); } /** @@ -116,4 +117,10 @@ class CatchAdminService extends Service ]); } + + public function registerClassAlias() + { + class_alias(Auth::class, 'Auth'); + } + } \ No newline at end of file diff --git a/catchAdmin/helper.php b/catchAdmin/helper.php index 7a1b907..51f1295 100644 --- a/catchAdmin/helper.php +++ b/catchAdmin/helper.php @@ -17,7 +17,7 @@ function deleteButton($name = '删除', $event = 'del') function addButton($name = '新增', $event = 'add') { return sprintf( - '%s', + '%s', $event, $name); } diff --git a/catchAdmin/login/controller/Index.php b/catchAdmin/login/controller/Index.php index a8cf774..176b6c9 100644 --- a/catchAdmin/login/controller/Index.php +++ b/catchAdmin/login/controller/Index.php @@ -1,6 +1,7 @@