Skip to content

Commit

Permalink
Filter out any directories within the logs folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtconner committed Aug 19, 2015
1 parent 35ee4eb commit 8346c85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ public static function getFiles($basename = false)
{
$files = glob(storage_path() . '/logs/*');
$files = array_reverse($files);
$files = array_filter($files, 'is_file');
if ($basename && is_array($files)) {
foreach ($files as $k => $file) {
$files[$k] = basename($file);
}
}
return $files;
return array_values($files);
}

/**
Expand Down

0 comments on commit 8346c85

Please sign in to comment.