ToggleColumn restore action
Hi, I'm trying to make my togglecolumn restore or softdelete after change, is it possible?
13 Replies
Do you have any error?
Yes
can you show your code
You need to see just the Resource or Model too?
I just added a ToggleColumn, it seems Filament tries to update "deleted_at" to 0. But I have no idea how to make this toggle restore this row.
ToggleColumn update boolean (true/false). I don't think you can update another column (not boolean column)
sad 😦
My suggestions: Make boolean column like
is_deleted
and update that column using toggleColumn, and you can use ->afterStateUpdated()
to update the deleted_at column..I was thinking to make something like this... It seems is the only one solution
Something like
maybe
thank you very much
Ill do that
@Vp I found a solution through mutators.
Nice