diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index cc069e1..4f3f936 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -20,7 +20,7 @@ jobs: coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 - name: Run PHPStan run: ./vendor/bin/phpstan --error-format=github diff --git a/src/FilamentLaravelLogPlugin.php b/src/FilamentLaravelLogPlugin.php index fb4b6c5..13b9021 100644 --- a/src/FilamentLaravelLogPlugin.php +++ b/src/FilamentLaravelLogPlugin.php @@ -47,10 +47,6 @@ public static function get(): static public function register(Panel $panel): void { - if (! $this->isAuthorized()) { - return; - } - $panel ->pages([ $this->viewLog, diff --git a/src/Pages/ViewLog.php b/src/Pages/ViewLog.php index 75645ed..ec52ca8 100644 --- a/src/Pages/ViewLog.php +++ b/src/Pages/ViewLog.php @@ -117,4 +117,9 @@ public function getTitle(): string { return __('log::filament-laravel-log.page.title'); } + + public static function canAccess(): bool + { + return FilamentLaravelLogPlugin::get()->isAuthorized(); + } }