Skip to content

Commit 07e88d1

Browse files
committed
wip
1 parent c8f795c commit 07e88d1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "laravel/nova-log-viewer",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "A Laravel Nova tool for viewing your application logs.",
55
"keywords": [
66
"laravel",

src/Http/Controllers/Pages/LogViewerController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __invoke()
2424
'logs' => collect($logs)->map(function (SplFileInfo $log) {
2525
return [
2626
'label' => $log->getRelativePathname(),
27-
'value' => $log->getPathname(),
27+
'value' => $log->getRelativePathname(),
2828
];
2929
}),
3030
]);
@@ -39,7 +39,7 @@ public function __invoke()
3939
public function fetch(NovaRequest $request)
4040
{
4141
$request->validate(['lastLine' => ['numeric']]);
42-
$logFile = new File($request->log);
42+
$logFile = new File(storage_path('logs/' . $request->log));
4343
$lines = $logFile->contentAfterLine($request->lastLine);
4444
$lastLine = $request->lastLine + substr_count($lines, PHP_EOL);
4545

0 commit comments

Comments
 (0)