How can i use Extras method, called in controller
Extras
- emptyTrash() - permanently deletes all trashed records.
- restoreTrash($entity = null, array $options = []) - restores one (or all) trashed records.
- cascadingRestoreTrash($entity = null, array $options = []) - restores one (or all) trashed records including those of dependent associations.
-
trash($entity, array $options = []) - like
delete()
but for a soft-delete (handy whenModel.beforeDelete
is disabled by default). -
trashAll(array $conditions) - like
deleteAll()
but for soft-deletes.