From c8eedead0059e9fb84f191c513aa2d15b4a03d71 Mon Sep 17 00:00:00 2001 From: wuyanwen Date: Thu, 12 Dec 2019 18:53:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=B8=AD=E9=97=B4=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catchAdmin/CatchAdminService.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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