Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhemphill committed May 5, 2022
1 parent c8f795c commit 07e88d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "laravel/nova-log-viewer",
"version": "0.1.1",
"version": "0.1.2",
"description": "A Laravel Nova tool for viewing your application logs.",
"keywords": [
"laravel",
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/Pages/LogViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __invoke()
'logs' => collect($logs)->map(function (SplFileInfo $log) {
return [
'label' => $log->getRelativePathname(),
'value' => $log->getPathname(),
'value' => $log->getRelativePathname(),
];
}),
]);
Expand All @@ -39,7 +39,7 @@ public function __invoke()
public function fetch(NovaRequest $request)
{
$request->validate(['lastLine' => ['numeric']]);
$logFile = new File($request->log);
$logFile = new File(storage_path('logs/' . $request->log));
$lines = $logFile->contentAfterLine($request->lastLine);
$lastLine = $request->lastLine + substr_count($lines, PHP_EOL);

Expand Down

0 comments on commit 07e88d1

Please sign in to comment.