Hey @diazwatson
I do not get why you simply not put it directly in getHeaderActions this is the way they are meant to be used.
https://filamentphp.com/docs/3.x/panels/pages#adding-actions-to-pages
Are you using them somewhere else as well?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a resource page where I have created a couple of custom actions. The buttons appear but when I click nothing happens.
The only way they work is when I add my custom actions to the getHeaderActions([]) but obviously that duplicate the actions as well as it renders my custom actions in the header but that is not what I want.
namespace App\Filament\Play\Resources\GameResource\Pages;
use App\Filament\Play\Resources\GameResource;
use App\Models\Game;
use Filament\Actions\Action;
use Filament\Actions\StaticAction;
use Filament\Forms\Components\TextInput;
use Filament\Infolists\Components\TextEntry\TextEntrySize;
use Filament\Resources\Concerns\Translatable;
use Filament\Resources\Pages\Page;
use Filament\Support\Enums\FontFamily;
use Filament\Support\Enums\IconPosition;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Database\Eloquent\Collection;
use LaravelIdea\Helper\App\Models\_IH_Game_C;
class GameList extends Page
{
use Translatable;
protected static string $resource = GameResource::class;
protected static string $view = 'filament.play.resources.game.pages.list';
protected function getHeaderActions(): array
{
return [
// $this->newGameAction(),
// $this->joinGameAction(),
];
}
public function newGameAction()
{
$identifier = \App\Models\GameSession::generateIdentifier();
return Action::make('new')
->label('New game')
->translateLabel()
->slideOver()
->modalSubmitActionLabel('Start')
->infolist([
\Filament\Infolists\Components\TextEntry::make('Session identifier')
->translateLabel()
->copyable()
->copyMessage('Copied!')
->icon('heroicon-m-share')
->iconPosition(IconPosition::After)
->size(TextEntrySize::Large)
->copyMessageDuration(1500)
->helperText('Share this code with your friends to join the game.')
->fontFamily(FontFamily::Mono)
->state(
[
'identifier' => $identifier,
]
),
])
->action(function (\App\Actions\NewGameAction $newGameAction, $arguments) use ($identifier){
$newGameAction->execute($arguments['game_id'], auth()->id(), $identifier);
});
}
...
Please or to participate in this conversation.