SoftDeletes
trait SoftDeletes (View source)
Properties
protected bool | $forceDeleting | Indicates if the model is currently force deleting. |
Methods
Boot the soft deleting trait for a model.
Initialize the soft deleting trait for an instance.
Force a hard delete on a soft deleted model.
Force a hard delete on a soft deleted model without raising any events.
Perform the actual delete query on this model instance.
Perform the actual delete query on this model instance.
Restore a soft-deleted model instance.
Restore a soft-deleted model instance without raising any events.
Determine if the model instance has been soft-deleted.
Register a "softDeleted" model event callback with the dispatcher.
Register a "restoring" model event callback with the dispatcher.
Register a "restored" model event callback with the dispatcher.
Register a "forceDeleting" model event callback with the dispatcher.
Register a "forceDeleted" model event callback with the dispatcher.
Determine if the model is currently force deleting.
Get the name of the "deleted at" column.
Get the fully qualified "deleted at" column.
Details
bool|null
forceDeleteQuietly()
Force a hard delete on a soft deleted model without raising any events.
static void
softDeleted(QueuedClosure|callable|class-string $callback)
Register a "softDeleted" model event callback with the dispatcher.
static void
restoring(QueuedClosure|callable|class-string $callback)
Register a "restoring" model event callback with the dispatcher.
static void
restored(QueuedClosure|callable|class-string $callback)
Register a "restored" model event callback with the dispatcher.
static void
forceDeleting(QueuedClosure|callable|class-string $callback)
Register a "forceDeleting" model event callback with the dispatcher.
static void
forceDeleted(QueuedClosure|callable|class-string $callback)
Register a "forceDeleted" model event callback with the dispatcher.