Skip to content

Commit

Permalink
Update HasNavGroupLabel.php
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Apr 14, 2024
1 parent 5de4220 commit 7f8ff32
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Concerns/HasNavGroupLabel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ public function navigationGroupLabel(Closure | array $resources): static

public function getNavigationGroupLabel(): Closure | array
{
return $this->evaluate($this->navigationGroupLabel);
return $this->navigationGroupLabel;
}

public function getLabel(string $resource): Closure | string
{
return array_merge(
(new static())::get()->defaultNavigationGroupLabel,
$this->getNavigationGroupLabel()
)[$resource];
return $this->evaluate(
array_merge(
(new static())::get()->defaultNavigationGroupLabel,
$this->getNavigationGroupLabel()
)[$resource]
);
}
}

0 comments on commit 7f8ff32

Please sign in to comment.