© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
Iztok

Edit action in getHeaderActions

I used to be able to simply do this on Resource view page (or any other Resource page):
    protected function getHeaderActions(): array
    {
        return [
            ViewAction::make(),
            EditAction::make(),
            DeleteAction::make()
        ];
    }
    protected function getHeaderActions(): array
    {
        return [
            ViewAction::make(),
            EditAction::make(),
            DeleteAction::make()
        ];
    }

But after the update the edit link opens an empty modal, so I have to specify the url like this:
    {
        return [
            ViewAction::make(),
            EditAction::make()
                ->url(fn ($record): string => PhantomInstanceResource::getUrl('edit', ['record' => $record])),
            DeleteAction::make()
        ];
    }
    {
        return [
            ViewAction::make(),
            EditAction::make()
                ->url(fn ($record): string => PhantomInstanceResource::getUrl('edit', ['record' => $record])),
            DeleteAction::make()
        ];
    }

Is there any way to define the default edit action in the resource definition?
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

edit action in infolist
FilamentFFilament / ❓┊help
3y ago
Edit Action
FilamentFFilament / ❓┊help
2y ago
Edit Action
FilamentFFilament / ❓┊help
3y ago
Custom action based in Edit
FilamentFFilament / ❓┊help
16mo ago