diff --git a/catchAdmin/CatchAdminService.php b/catchAdmin/CatchAdminService.php index f9ac0c4..8a338c1 100644 --- a/catchAdmin/CatchAdminService.php +++ b/catchAdmin/CatchAdminService.php @@ -1,6 +1,7 @@ registerValidates(); + $this->registerMiddleWares(); } /** @@ -46,6 +48,17 @@ class CatchAdminService extends Service $validate->extend($vali->type(), [$vali, 'verify'], $vali->message()); } }); + } + /** + * + * @time 2019年12月12日 + * @return void + */ + protected function registerMiddleWares(): void + { + $this->app->middleware->import([ + 'check_auth' => PermissionsMiddleware::class + ], 'route'); } } \ No newline at end of file