user()?->can('viewAny', NotificationChannel::class) ?? false; } public function getWidgets(): array { return [ [Widgets\NotificationChannelsList::class], ]; } protected function getHeaderActions(): array { return [ Action::make('add') ->label('Add new Channel') ->icon('heroicon-o-plus') ->modalHeading('Add a new Channel') ->modalSubmitActionLabel('Add') ->form(Actions\Create::form()) ->authorize('create', NotificationChannel::class) ->modalWidth(MaxWidth::Large) ->action(function (array $data) { try { Actions\Create::action($data); $this->dispatch('$refresh'); } catch (\Exception) { $this->halt(); } }), ]; } }