Download the PHP package adiafora/revisionable-force-delete without Composer
On this page you can find all versions of the php package adiafora/revisionable-force-delete. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download adiafora/revisionable-force-delete
More information about adiafora/revisionable-force-delete
Files in adiafora/revisionable-force-delete
Package revisionable-force-delete
Short Description Package improvement VentureCraft/revisionable
License MIT
Informations about the package revisionable-force-delete
Revisionable with Force Delete
This package is an improvement on another package - Revisionable. You must install it before installing this package.
This package adds support for saving Force deleted models.
Install
Run:
Usage
Just add a trait RevisionableForceDeleteTrait
to the model whose revision you want to save.
Storing Force Delete
By default the Force Delete of a model is not stored as a revision.
If you want to store the Force Delete as a revision you can override this behavior by setting revisionForceDeleteEnabled
to true
by adding the following to your model:
In which case, the created_at
field will be stored as a key with the oldValue()
value equal to the model creation date and the newValue()
value equal to null
.
Attention! Turn on this setting carefully! Since the model saved in the revision, now does not exist, so you will not be able to get its object or its relations.
All versions of revisionable-force-delete with dependencies
illuminate/support Version ~4.0|~5.0|~5.1|^6.0
laravel/framework Version ~5.4|^6.0
venturecraft/revisionable Version >=1.0