© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
Robin

Mutate relation data before save

I'm trying to mutate my data of a relationmanager before I save the records (attach).

The attach should get an extra parameter of the 'parent' in the relation that has some data, so I can save/mutate the data. It should also hook into another function so that I can update other data. For example;

In the relation manager I have this;

Tables\Actions\AttachAction::make()->preloadRecordSelect()->beforeFormFilled(function (array $data) {
    dd($data);
}),
Tables\Actions\AttachAction::make()->preloadRecordSelect()->beforeFormFilled(function (array $data) {
    dd($data);
}),


I don't see any DD being triggered here. I want, when the user presses attach, that there is data being added to the attaching object. Plus that there is another function that is being called to "sync" other data. Any ideas?
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

mutate relation data before saving
FilamentFFilament / ❓┊help
3y ago
Mutate form data before creating record on relation manager
FilamentFFilament / ❓┊help
2y ago
Mutate data on relation manager
FilamentFFilament / ❓┊help
3y ago