SoftDeletingTrait
trait SoftDeletingTrait (View source)
Methods
static
void
bootSoftDeletingTrait()
Boot the soft deleting trait for a model.
void
forceDelete()
Force a hard delete on a soft deleted model.
bool|null
restore()
Restore a soft-deleted model instance.
bool
trashed()
Determine if the model instance has been soft-deleted.
static
Builder|SoftDeletingTrait
withTrashed()
Get a new query builder that includes soft deletes.
static
Builder|SoftDeletingTrait
onlyTrashed()
Get a new query builder that only includes soft deletes.
static
void
static
void
string
getDeletedAtColumn()
Get the name of the "deleted at" column.
string
getQualifiedDeletedAtColumn()
Get the fully qualified "deleted at" column.
Details
at line line 109
static
Builder|SoftDeletingTrait
withTrashed()
Get a new query builder that includes soft deletes.
at line line 119
static
Builder|SoftDeletingTrait
onlyTrashed()
Get a new query builder that only includes soft deletes.
at line line 134
static
void
restoring(
Closure|string $callback)
Register a restoring model event with the dispatcher.