How can I know which was changes on a Select field using relationship()?
My edit form inside the resource is simple, using the
I'm trying to create a history record after user made changes on the relationship, but couldn't get the information about the changes.
I looked into the EditRecord's lifecycle and seems it's can only be retrieved in
So, how can I know the old values and new values of this relationship in this hook? I'm thinking about creating a hidden field to get the values, do you have any other suggestion?
relationship() function for a BelongsToMany relationshipForms\Components\MultiSelect::make('handle_departments')
->relationship('handle_departments', 'name')I'm trying to create a history record after user made changes on the relationship, but couldn't get the information about the changes.
I looked into the EditRecord's lifecycle and seems it's can only be retrieved in
beforeValidate hookSo, how can I know the old values and new values of this relationship in this hook? I'm thinking about creating a hidden field to get the values, do you have any other suggestion?