From f6acf9779669568e8afce1182e1a5579d5a0ffe5 Mon Sep 17 00:00:00 2001 From: ikeedo Date: Sat, 2 Mar 2019 16:10:46 +0100 Subject: [PATCH] fix setFolder method (#188) $this->storage_path expected to be a string, not an array --- src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php index ec6aafd..555eb23 100644 --- a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php +++ b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php @@ -57,13 +57,10 @@ public function setFolder($folder) if (app('files')->exists($folder)) { $this->folder = $folder; } - if(is_array($this->storage_path)){ - foreach ($this->storage_path as $value) { - $logsPath = $value . '/' . $folder; - if (app('files')->exists($logsPath)) { - $this->folder = $folder; - break; - } + if ($this->storage_path) { + $logsPath = $this->storage_path . '/' . $folder; + if (app('files')->exists($logsPath)) { + $this->folder = $folder; } } }