diff --git a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php index 4b38736..88dfa42 100644 --- a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php +++ b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php @@ -124,12 +124,13 @@ public static function getFiles($basename = false) { $files = glob(storage_path() . '/logs/*'); $files = array_reverse($files); + $files = array_filter($files, 'is_file'); if ($basename && is_array($files)) { foreach ($files as $k => $file) { $files[$k] = basename($file); } } - return $files; + return array_values($files); } /**