Skip to content

Commit 3790892

Browse files
authored
fix storage_path
1 parent 364cd46 commit 3790892

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function all()
195195
*/
196196
public function getFolders()
197197
{
198-
$folders = glob(storage_path() . '/'.$this->storage_path.'/*', GLOB_ONLYDIR);
198+
$folders = glob($this->storage_path.'/*', GLOB_ONLYDIR);
199199
if (is_array($folders)) {
200200
foreach ($folders as $k => $folder) {
201201
$folders[$k] = basename($folder);
@@ -221,7 +221,7 @@ public function getFolderFiles($basename = false)
221221
public function getFiles($basename = false, $folder = '')
222222
{
223223
$pattern = function_exists('config') ? config('logviewer.pattern', '*.log') : '*.log';
224-
$files = glob(storage_path() . '/'.$this->storage_path.'/' . $folder . '/' . $pattern, preg_match($this->pattern->getPattern('files'), $pattern) ? GLOB_BRACE : 0);
224+
$files = glob($this->storage_path.'/' . $folder . '/' . $pattern, preg_match($this->pattern->getPattern('files'), $pattern) ? GLOB_BRACE : 0);
225225
$files = array_reverse($files);
226226
$files = array_filter($files, 'is_file');
227227
if ($basename && is_array($files)) {
@@ -231,4 +231,4 @@ public function getFiles($basename = false, $folder = '')
231231
}
232232
return array_values($files);
233233
}
234-
}
234+
}

0 commit comments

Comments
 (0)