Allow non-existant field to pass resource form fill on saving #6871
Unanswered
LuanHimmlisch
asked this question in
Help
Replies: 2 comments
-
Its not Filament, it's Eloquent that does that if its not |
Beta Was this translation helpful? Give feedback.
0 replies
-
You haven't described what the issue you're having, so this might not be helpful - but since I came across an unanswered question I thought I'd post something that might be useful. You can modify the data before it gets passed to Eloquent with this method on your page: protected function mutateFormDataBeforeSave(array $data): array
{
unset($data['taxonomy']);
// Maybe do your custom logic here too
return $data;
} https://filamentphp.com/docs/4.x/resources/editing-records#customizing-data-before-saving |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a field on a resource that doesn't correspond to a column of the model.
I need this field to pass the saving from Filament, since I use this offset on the boot for custom logic:
I can't find a way to prevent Filament from correctly detecting the field is not a column and erasing it from the data.
Beta Was this translation helpful? Give feedback.
All reactions