Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ATR22's avatar
Level 1

Filament afterActionCalled name collision.

Hey everyone.

I have a Page in my Filament panel. in this page i have a simple user list, and at the end of any row i have a button for opening a modal and then show full info of any user. the problem is, for getting those specific users I have ti use InteractsWithRecord and for Modal Action I have to use InteractsWithActions. and both have a method named afterActionCalled. the code:

and the error:

Trait method Filament\Resources\Pages\Concerns\InteractsWithRecord::afterActionCalled has not been applied as App\Filament\Employer\Resources\AdResource\Pages\SearchResume::afterActionCalled, because of collision with Filament\Actions\Concerns\InteractsWithActions::afterActionCalled 

i used this solution too:

use InteractsWithActions {
        afterActionCalled as afterActionCalledFromActions;
    }
    use InteractsWithRecord {
        afterActionCalled as afterActionCalledFromRecord;
    }

but it didnt work.

Any help please?

0 likes
2 replies
Shivamyadav's avatar

You have to alias both afterActionCalled methods and then write your own afterActionCalled method in the class to call the respective aliased method when needed.

ATR22's avatar
Level 1

Thank you for your answer my friend. I did it and I got this error:

Declaration of App\Filament\Employer\Resources\AdResource\Pages\SearchResume::afterActionCalled(string $name, array $arguments): void must be compatible with Filament\Pages\BasePage::afterActionCalled(): void

As the error said, we should give same arguments to afterActionCalled that BasePage file did. But there is no afterActionCalled method in Filament\Pages\BasePage!

Would you guide me more please?

Please or to participate in this conversation.