Skip to content

Commit

Permalink
fix storage_path
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre authored Jul 17, 2018
1 parent 364cd46 commit 3790892
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function all()
*/
public function getFolders()
{
$folders = glob(storage_path() . '/'.$this->storage_path.'/*', GLOB_ONLYDIR);
$folders = glob($this->storage_path.'/*', GLOB_ONLYDIR);
if (is_array($folders)) {
foreach ($folders as $k => $folder) {
$folders[$k] = basename($folder);
Expand All @@ -221,7 +221,7 @@ public function getFolderFiles($basename = false)
public function getFiles($basename = false, $folder = '')
{
$pattern = function_exists('config') ? config('logviewer.pattern', '*.log') : '*.log';
$files = glob(storage_path() . '/'.$this->storage_path.'/' . $folder . '/' . $pattern, preg_match($this->pattern->getPattern('files'), $pattern) ? GLOB_BRACE : 0);
$files = glob($this->storage_path.'/' . $folder . '/' . $pattern, preg_match($this->pattern->getPattern('files'), $pattern) ? GLOB_BRACE : 0);
$files = array_reverse($files);
$files = array_filter($files, 'is_file');
if ($basename && is_array($files)) {
Expand All @@ -231,4 +231,4 @@ public function getFiles($basename = false, $folder = '')
}
return array_values($files);
}
}
}

0 comments on commit 3790892

Please sign in to comment.