Skip to content

Commit

Permalink
Update MoonShineUserRoleResource.php
Browse files Browse the repository at this point in the history
replace indexButtons() to activeActions()
  • Loading branch information
TheForwardDev authored Dec 18, 2024
1 parent 3f3b509 commit 652584d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Resources/MoonShineUserRoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace MoonShine\Laravel\Resources;

use MoonShine\Laravel\Models\MoonshineUserRole;
use MoonShine\Laravel\Enums\Action;
use MoonShine\Support\Attributes\Icon;
use MoonShine\Support\ListOf;
use MoonShine\UI\Components\ActionButton;
use MoonShine\UI\Components\Layout\Box;
use MoonShine\UI\Fields\ID;
use MoonShine\UI\Fields\Text;
Expand Down Expand Up @@ -35,9 +35,9 @@ public function getTitle(): string
return __('moonshine::ui.resource.role');
}

protected function indexButtons(): ListOf
protected function activeActions(): ListOf
{
return parent::indexButtons()->except(fn (ActionButton $btn): bool => $btn->getName() === 'detail-button');
return parent::activeActions()->except(Action::VIEW);
}

protected function indexFields(): iterable
Expand Down

0 comments on commit 652584d

Please sign in to comment.