© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
4 replies
RHofmann

Resource table action not being triggered

Hi,

I've created a table within a resource and have a simple row action. When I click on the icon it spins but the action itself is never triggered.
I'm not sure where I'm going wrong the file was created using
php artisan make:filament-resource Service --simple --view
php artisan make:filament-resource Service --simple --view


class ServiceResource extends Resource
{
  public static function table(Table $table): Table
    {
        return $table
            ->columns([
                TextColumn::make('state')
                    ->formatStateUsing(fn (string $state): string => strtoupper($state))
                    ->searchable()
                    ->sortable()
                    ->badge()
                    ->color(fn (string $state): string => match ($state) {
                        'running' => 'success',
                        'stopped' => 'danger'
                    })
                    ->weight('medium')
                    ->alignLeft(),
            ])
            ->actions([
                Action::make('test')
                    ->icon('heroicon-o-play')
                    ->color('success')
                    ->action(function ($record) {
                        error_log('Action triggered');
                        \Log::info('Action triggered', [
                            'record' => $record->toArray(),
                            'state' => $record->state
                         ]);
                    })
            ])
    }
...
}
class ServiceResource extends Resource
{
  public static function table(Table $table): Table
    {
        return $table
            ->columns([
                TextColumn::make('state')
                    ->formatStateUsing(fn (string $state): string => strtoupper($state))
                    ->searchable()
                    ->sortable()
                    ->badge()
                    ->color(fn (string $state): string => match ($state) {
                        'running' => 'success',
                        'stopped' => 'danger'
                    })
                    ->weight('medium')
                    ->alignLeft(),
            ])
            ->actions([
                Action::make('test')
                    ->icon('heroicon-o-play')
                    ->color('success')
                    ->action(function ($record) {
                        error_log('Action triggered');
                        \Log::info('Action triggered', [
                            'record' => $record->toArray(),
                            'state' => $record->state
                         ]);
                    })
            ])
    }
...
}


Thanks
Solution
Does the
Service
Service
model have
id
id
as primary key?
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

CreateAction::make()->before() not being triggered.
FilamentFFilament / ❓┊help
9mo ago
Parameter being null after table action
FilamentFFilament / ❓┊help
2y ago
table action not showing
FilamentFFilament / ❓┊help
12mo ago
Table Action Not Working
FilamentFFilament / ❓┊help
3y ago