Multiple actions inline

How can I have the two actions side by side? I tried without the group but doesn't work with the error
Header actions must be an instance of Filament\Actions\Action, or Filament\Actions\ActionGroup.
Header actions must be an instance of Filament\Actions\Action, or Filament\Actions\ActionGroup.
This code display a dropdown but isn't what I want.
protected function getHeaderActions(): array
{

return [
ActionGroup::make([
Action::make()
->name('view')
->icon('heroicon-o-arrow-down-tray')
->url(route('exam.pdf.download', $this->record))
->openUrlInNewTab(),
DeleteAction::make(),
])
];
}
protected function getHeaderActions(): array
{

return [
ActionGroup::make([
Action::make()
->name('view')
->icon('heroicon-o-arrow-down-tray')
->url(route('exam.pdf.download', $this->record))
->openUrlInNewTab(),
DeleteAction::make(),
])
];
}
Thanks.
Solution:
```php use Filament\Actions; protected function getHeaderActions(): array { return [...
Jump to solution
5 Replies
LeandroFerreira
LeandroFerreira6mo ago
return [
Action::make('action1'),
Action::make('action2')
]
return [
Action::make('action1'),
Action::make('action2')
]
?
Proks D
Proks DOP6mo ago
Header actions must be an instance of Filament\Actions\Action, or Filament\Actions\ActionGroup.
Header actions must be an instance of Filament\Actions\Action, or Filament\Actions\ActionGroup.
😢
Solution
LeandroFerreira
LeandroFerreira6mo ago
use Filament\Actions;
protected function getHeaderActions(): array
{
return [
Actions\Action::make('action1'),
Actions\Action::make('action2'),
];
}
use Filament\Actions;
protected function getHeaderActions(): array
{
return [
Actions\Action::make('action1'),
Actions\Action::make('action2'),
];
}
Proks D
Proks DOP6mo ago
That is it! Valeu Leandro! Actions\ resolveu. Meu chefe só dropou isso no meu colo um projeto novo, 10 anos sem ver PHP. Poderia me falar o por que precisar dessa Actions?
LeandroFerreira
LeandroFerreira6mo ago
namespace Filament\Actions\Action
Want results from more Discord servers?
Add your server