Skip to content

Commit fd76545

Browse files
committed
CHG: Respect the perPage setting of log-viewer plus add a short docu in the readme
1 parent 1092d03 commit fd76545

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ public function tools()
5050

5151
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
5252

53+
## Configuration
54+
55+
You can configure the behavior of the log view within a config file. First, just publish the default one:
56+
57+
```
58+
php artisan vendor:publish --tag=config
59+
```
60+
61+
Now you can edit the settings in the file `config/log-viewer.php`.
62+
5363
## Credits
5464

5565
- [PHPJunior](https://github.com/PHPJunior/nova-logs)

src/Http/Controllers/NovaLogViewerController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class NovaLogViewerController extends Controller
1919
private $logViewer;
2020

2121
/** @var int */
22-
protected $perPage = 20;
22+
protected $perPage;
2323

2424
/**
2525
* NovaLogViewerController constructor.
@@ -28,6 +28,7 @@ class NovaLogViewerController extends Controller
2828
public function __construct(LogViewerContract $logViewer)
2929
{
3030
$this->logViewer = $logViewer;
31+
$this->perPage = config("log-viewer.per-page");
3132
}
3233

3334
/**

0 commit comments

Comments
 (0)