From 6372ccd87703f5e4dee4e15c93091b0f398078b3 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Wed, 31 Mar 2021 20:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/system/route.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/catch/system/route.php b/catch/system/route.php index 9f09e8a..c3bf4d4 100644 --- a/catch/system/route.php +++ b/catch/system/route.php @@ -45,7 +45,13 @@ $router->group(function () use ($router) { $router->put('modules/', '\catchAdmin\system\controller\Module@disOrEnable'); $router->put('cache/modules', '\catchAdmin\system\controller\Module@cache'); $router->delete('clear/modules', '\catchAdmin\system\controller\Module@clear'); - })->middleware('auth'); +// 获取 table +$router->get('table//', function ($module, $tableClass){ + $table = sprintf('\\catchAdmin\\%s\\tables\\%s', $module, $tableClass); + + return (new $table)->render(request()->param('only')); +}); +