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.
forceDeleteQuietly ( ) : bool|null
Force a hard delete on a soft deleted model without raising any events.
performDeleteOnModel ( ) : mixed
Perform the actual delete query on this model instance.
runSoftDelete ( ) : void
Perform the actual delete query on this model instance.
restore ( ) : bool
Restore a soft-deleted model instance.
restoreQuietly ( ) : bool
Restore a soft-deleted model instance without raising any events.
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
forceDeleting ( $callback ) : void
Register a "forceDeleting" 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.