SoftDeletes
Properties
$forceDeleting bool
Indicates if the model is currently force deleting.
Methods
bootSoftDeletes ( ) : void
Boot the soft deleting trait for a model.
initializeSoftDeletes ( ) : void
Initialize the soft deleting trait for an instance.
forceDelete ( ) : bool|null
Force a hard delete on a soft deleted model.
performDeleteOnModel ( ) : mixed
Perform the actual delete query on this model instance.
runSoftDelete ( ) : void
Perform the actual delete query on this model instance.
restore ( ) : bool|null
Restore a soft-deleted model instance.
trashed ( ) : bool
Determine if the model instance has been soft-deleted.
softDeleted ( $callback ) : void
Register a "softDeleted" model event callback with the dispatcher.
Parameters
- $callback Closure |string
restoring ( $callback ) : void
Register a "restoring" model event callback with the dispatcher.
Parameters
- $callback Closure |string
restored ( $callback ) : void
Register a "restored" model event callback with the dispatcher.
Parameters
- $callback Closure |string
forceDeleted ( $callback ) : void
Register a "forceDeleted" model event callback with the dispatcher.
Parameters
- $callback Closure |string
isForceDeleting ( ) : bool
Determine if the model is currently force deleting.
getDeletedAtColumn ( ) : string
Get the name of the "deleted at" column.
getQualifiedDeletedAtColumn ( ) : string
Get the fully qualified "deleted at" column.