diff --git a/crmeb/app/services/system/SystemRouteServices.php b/crmeb/app/services/system/SystemRouteServices.php index 0060198de..56c76d472 100644 --- a/crmeb/app/services/system/SystemRouteServices.php +++ b/crmeb/app/services/system/SystemRouteServices.php @@ -266,11 +266,14 @@ class SystemRouteServices extends BaseServices foreach ($list as $key => $value) { foreach ($value as $item) { if (!$this->diffRoute($data, $item['rule'], $item['method']) && strstr($item['rule'], '') === false) { + $pathAndAction = explode('/', $item['route']); $save[] = [ 'name' => $item['option']['real_name'] ?? $item['name'], 'path' => $item['rule'], 'cate_id' => $key, 'app_name' => $app, + 'file_path' => 'app/' . $app . '/controller/' . str_replace('.', '/', $pathAndAction[0]) . '.php', + 'action' => $pathAndAction[1], 'type' => isset($item['option']['is_common']) && $item['option']['is_common'] ? 1 : 0, 'method' => $item['method'], 'add_time' => date('Y-m-d H:i:s'), @@ -305,6 +308,7 @@ class SystemRouteServices extends BaseServices app()->make(SystemMenusServices::class)->deleteMenu($item['path'], $item['method']); } } + $this->cacheDriver()->clear(); } /**