You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it would be better to add feature that soft-delete the model
Use case and Proposal
Normally different apps have different way to soft delete model/row
some have status column which have one of ACTIVE, INACTIVE or DELETED
some have is_deleted bool column
some have deleted_at column, if null then not deleted, if filled with date time then it is deleted
some might have other way to store
So my proposal is to add softDelete property to DeleteAction.php
Data type for it will be ?callable
Signature of callable
function($model) {
// now it is up to consumer of this package/developer's responsibility to soft delete model as they want// e.g. $model->is_deleted = true;
$model->save(false);
}
If callable is null then we will actually delete like it currently done
I am fine providing pull request.
The text was updated successfully, but these errors were encountered:
In
DeleteAction.php
it would be better to add feature that soft-delete the model
Use case and Proposal
Normally different apps have different way to soft delete model/row
status
column which have one ofACTIVE
,INACTIVE
orDELETED
is_deleted
bool columndeleted_at
column, ifnull
then not deleted, if filled with date time then it is deletedSo my proposal is to add
softDelete
property toDeleteAction.php
Data type for it will be
?callable
Signature of callable
If callable is
null
then we will actually delete like it currently doneI am fine providing pull request.
The text was updated successfully, but these errors were encountered: