can i group headeractions in getHeaderActions?

can i group headeractions in getHeaderActions?
Solution:
Use ActionGroup.
Jump to solution
3 Replies
Solution
alexanderkroneis
alexanderkroneisβ€’13mo ago
Use ActionGroup.
Falk Maria Zeitsprung
Falk Maria ZeitsprungOPβ€’13mo ago
hey thanks, that works:
class EditApplicant extends EditRecord
{
protected static string $resource = ApplicantResource::class;

protected function getHeaderActions(): array
{
return [
ActionGroup::make([
Action::make('pdf1_es')
->label('PDF1 ES')
->action('showPdf1Es')
->icon('heroicon-o-eye')
->size('sm')
->hidden(!auth()->user()->hasAnyRole(['Root', 'Admin', 'User'])),
]),
class EditApplicant extends EditRecord
{
protected static string $resource = ApplicantResource::class;

protected function getHeaderActions(): array
{
return [
ActionGroup::make([
Action::make('pdf1_es')
->label('PDF1 ES')
->action('showPdf1Es')
->icon('heroicon-o-eye')
->size('sm')
->hidden(!auth()->user()->hasAnyRole(['Root', 'Admin', 'User'])),
]),
alexanderkroneis
alexanderkroneisβ€’13mo ago
You're welcome πŸ™‚
Want results from more Discord servers?
Add your server