© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Diogo Pinto

Hide header actions on edit page

Hello!

I'm looking to customize the "delete" button on the edit page, to only show conditionally on my records.

Is there a way to achieve this? Thanks!
Solution
Solved! I wanted to disable the delete button if the current user editing is the same as the user in the model.

So in EditUser.php:

class EditUser extends EditRecord
{
    protected static string $resource = UserResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Actions\DeleteAction::make()
                ->disabled(auth()->id() == $this->record->id),
        ];
    }
}
class EditUser extends EditRecord
{
    protected static string $resource = UserResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Actions\DeleteAction::make()
                ->disabled(auth()->id() == $this->record->id),
        ];
    }
}
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Relation managers (Hide on edit page)
FilamentFFilament / ❓┊help
3y ago
Change bottom actions on edit page
FilamentFFilament / ❓┊help
3y ago
Header actions on "another" View page broken
FilamentFFilament / ❓┊help
11mo ago
Customising header actions on Resource List page
FilamentFFilament / ❓┊help
3y ago