diff --git a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php index 0a64d27..64e8379 100644 --- a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php +++ b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php @@ -165,7 +165,7 @@ public static function all() */ public static function getFiles($basename = false) { - $files = glob(storage_path() . '/logs/' . config('logviewer.pattern', '*.log')); + $files = glob(storage_path() . '/logs/' . (function_exists('config') ? config('logviewer.pattern', '*.log') : '*.log')); $files = array_reverse($files); $files = array_filter($files, 'is_file'); if ($basename && is_array($files)) {