Skip to content

Commit

Permalink
fix setFolder method (#188)
Browse files Browse the repository at this point in the history
$this->storage_path expected to be a string, not an array
  • Loading branch information
ikeedo authored and rap2hpoutre committed Mar 2, 2019
1 parent 98a333e commit f6acf97
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit f6acf97

Please sign in to comment.