From 5396f8d6de7431f36c04d9bff7668a1428ff101e Mon Sep 17 00:00:00 2001 From: jqh <841324345@qq.com> Date: Mon, 13 Jul 2020 11:53:27 +0800 Subject: [PATCH] wip --- src/DcatLogViewerServiceProvider.php | 2 +- src/LogController.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DcatLogViewerServiceProvider.php b/src/DcatLogViewerServiceProvider.php index 59dd516..55f74ed 100644 --- a/src/DcatLogViewerServiceProvider.php +++ b/src/DcatLogViewerServiceProvider.php @@ -25,8 +25,8 @@ class DcatLogViewerServiceProvider extends ServiceProvider 'middleware' => config('dcat-log-viewer.route.middleware'), ], function ($router) { $router->get('/', ['as' => 'dcat-log-viewer', 'uses' => 'LogController@index',]); + $router->get('download', ['as' => 'dcat-log-viewer.download', 'uses' => 'LogController@download',]); $router->get('{file}', ['as' => 'dcat-log-viewer.file', 'uses' => 'LogController@index',]); - $router->get('download/{file}', ['as' => 'dcat-log-viewer.download', 'uses' => 'LogController@download',]); }); } } diff --git a/src/LogController.php b/src/LogController.php index 3d30420..0555e3a 100644 --- a/src/LogController.php +++ b/src/LogController.php @@ -35,10 +35,11 @@ class LogController ]); } - public function download($file = null) + public function download() { $request = app('request'); + $file = trim($request->get('file')); $dir = trim($request->get('dir')); $filename = trim($request->get('filename')); $keyword = trim($request->get('keyword'));