Skip to content

Commit

Permalink
Merge pull request #6 from filipfonal/custom_pages_config
Browse files Browse the repository at this point in the history
Custom page config
  • Loading branch information
filipfonal authored Jan 6, 2023
2 parents dda8ff3 + d395ca4 commit 558c1ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions config/filament-log-manager.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use FilipFonal\FilamentLogManager\Pages\Logs;

return [
/**
* Set true to display navigation item in the group.
Expand All @@ -26,4 +28,9 @@
* Allow downloading logs from the user interface.
*/
'allow_download' => true,

/**
* Allow set custom logs page class.
*/
'page_class' => Logs::class,
];
11 changes: 7 additions & 4 deletions src/FilamentLogManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ class FilamentLogManagerServiceProvider extends PluginServiceProvider
'filament-log-manager-styles' => __DIR__.'/../resources/css/styles.css',
];

protected array $pages = [
Logs::class,
];

public function configurePackage(Package $package): void
{
$package
Expand All @@ -26,4 +22,11 @@ public function configurePackage(Package $package): void
->hasTranslations()
->hasCommand(FilamentLogManagerCommand::class);
}

protected function getPages(): array
{
return [
config('filament-log-manager.page_class') ?? Logs::class,
];
}
}

0 comments on commit 558c1ee

Please sign in to comment.