Skip to content

Commit

Permalink
Merge pull request #440 from naingwin/patch-1
Browse files Browse the repository at this point in the history
Update HasPageShield.php
  • Loading branch information
bezhanSalleh authored Nov 9, 2024
2 parents bc724f7 + 5f248ad commit 98ab121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/HasPageShield.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ protected static function getPermissionName(): string
->toString();
}

public static function shouldRegisterNavigation(): bool
public static function shouldRegisterNavigation(array $parameters = []): bool
{
return static::canAccess() && parent::shouldRegisterNavigation();
}

public static function canAccess(): bool
public static function canAccess(array $parameters = []): bool
{
return Filament::auth()->user()->can(static::getPermissionName());
}
Expand Down

0 comments on commit 98ab121

Please sign in to comment.