From eb0d72ffc8fa32bbb0a3a738e87d8c7115ba77ea Mon Sep 17 00:00:00 2001 From: jqh <841324345@qq.com> Date: Tue, 14 Jul 2020 16:32:35 +0800 Subject: [PATCH] wip --- resources/view/log.blade.php | 2 +- src/LogViewer.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/view/log.blade.php b/resources/view/log.blade.php index e00a38c..c4929b8 100644 --- a/resources/view/log.blade.php +++ b/resources/view/log.blade.php @@ -258,7 +258,7 @@ @foreach($logDirs as $d)
  • - {{ $d }} + {{ basename($d) }}
  • @endforeach diff --git a/src/LogViewer.php b/src/LogViewer.php index 9d7575b..dbe087f 100644 --- a/src/LogViewer.php +++ b/src/LogViewer.php @@ -158,10 +158,10 @@ class LogViewer } $files = glob($this->mergeDirectory().'/*.*'); - $files = array_combine($files, array_map('filemtime', $files)); - arsort($files); + //$files = array_combine($files, array_map('filemtime', $files)); + rsort($files); - return array_map('basename', array_keys($files)); + return array_map('basename', $files); } public function getLogDirectories()