Skip to content

Commit 617664c

Browse files
committed
use default config setup
1 parent a91d253 commit 617664c

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/LogViewer.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,10 @@ class LogViewer
1919

2020
protected Filesystem $fs;
2121

22-
/**
23-
* @var array<mixed>
24-
*/
25-
protected array $fallbackConfig;
26-
2722
public function __construct(Application $app)
2823
{
2924
$this->app = $app;
3025
$this->fs = $this->app['files'];
31-
$this->fallbackConfig = require_once(__DIR__ . '/../config/logviewer.php');
3226
$this->storagePath = $this->config('storage_path');
3327
}
3428

@@ -47,7 +41,7 @@ public function route(): string
4741
*/
4842
public function config(string $config, mixed $default = null): mixed
4943
{
50-
return $this->app['config']->get('logviewer.' . $config, Arr::get($this->fallbackConfig, $config) ?? $default);
44+
return $this->app['config']->get('logviewer.' . $config, $default);
5145
}
5246

5347
public function storagePath(): string

src/LogViewerServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class LogViewerServiceProvider extends ServiceProvider
1010
{
1111
public function boot(): void
1212
{
13+
$this->mergeConfigFrom(__DIR__ . '/../config/logviewer.php', 'logviewer');
14+
1315
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'logviewer');
1416

1517
$this->publishes([

0 commit comments

Comments
 (0)