model->delete() with SoftDelete how to undelete? |
Reference : https://codeigniter4.github.io/userguide...tml#delete
with $useSoftDeletes: true one can 'hide a row'. Is there an option to undelete()?
$builder->set('deleted_at', null)->update($id); ?
You simply have to set the deleted_at field to null (deleted rows contain datetime string there).
So, running something like model('YourModel')->update(3, ['deleted_at' => null]); Would do the trick
==
Donatas G. |
Welcome Guest, Not a member yet? Register Sign In |