From 4a76ba708a1013c12b004bbe0451dcd25c6091be Mon Sep 17 00:00:00 2001 From: zhaoxiang Date: Wed, 10 Jun 2020 11:54:46 +0800 Subject: [PATCH] =?UTF-8?q?modified=20=E9=87=8D=E6=96=B0=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=94=9F=E6=88=90=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/util/RouterTool.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/util/RouterTool.php b/application/util/RouterTool.php index d4d4ed0..5503880 100644 --- a/application/util/RouterTool.php +++ b/application/util/RouterTool.php @@ -20,7 +20,7 @@ class RouterTool { public static function buildAdminRouter() { $methodArr = ['*', 'get', 'post', 'put', 'delete']; $routePath = Env::get('route_path') . 'route.php'; - $bakPath = Env::get('route_path') . 'route.php.bak'; + $bakPath = Env::get('route_path') . 'route.bak'; if (file_exists($bakPath)) { unlink($bakPath); } @@ -42,6 +42,7 @@ class RouterTool { } } } + $context .= "Route::group('admin', function() {Route::miss('admin/Miss/index');})->middleware('AdminResponse');" . PHP_EOL; file_put_contents($routePath, $context); }