SoftDeletes
trait SoftDeletes
Properties
protected bool | $forceDeleting | Indicates if the model is currently force deleting. |
Methods
Boot the soft deleting trait for a model.
Force a hard delete on a soft deleted model.
Perform the actual delete query on this model instance.
Perform the actual delete query on this model instance.
Restore a soft-deleted model instance.
Determine if the model instance has been soft-deleted.
Determine if the model is currently force deleting.
Get the name of the "deleted at" column.
Get the fully qualified "deleted at" column.
Details
at line 19
static void
bootSoftDeletes()
Boot the soft deleting trait for a model.
at line 29
bool|null
forceDelete()
Force a hard delete on a soft deleted model.
at line 45
protected mixed
performDeleteOnModel()
Perform the actual delete query on this model instance.
at line 59
protected void
runSoftDelete()
Perform the actual delete query on this model instance.
at line 83
bool|null
restore()
Restore a soft-deleted model instance.
at line 111
bool
trashed()
Determine if the model instance has been soft-deleted.
at line 122
static void
restoring(Closure|string $callback)
Register a restoring model event with the dispatcher.
at line 133
static void
restored(Closure|string $callback)
Register a restored model event with the dispatcher.
at line 143
bool
isForceDeleting()
Determine if the model is currently force deleting.
at line 153
string
getDeletedAtColumn()
Get the name of the "deleted at" column.
at line 163
string
getQualifiedDeletedAtColumn()
Get the fully qualified "deleted at" column.