SoftDeletes (Database\Eloquent)

SoftDeletes

trait SoftDeletes (View source)

Methods

static void bootSoftDeletes()

Boot the soft deleting trait for a model.

bool|null 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 void restoring(Closure|string $callback)

Register a restoring model event with the dispatcher.

static void restored(Closure|string $callback)

Register a restored model event with the dispatcher.

bool isForceDeleting()

Determine if the model is currently force deleting.

string getDeletedAtColumn()

Get the name of the "deleted at" column.

string getQualifiedDeletedAtColumn()

Get the fully qualified "deleted at" column.

Details

static void bootSoftDeletes()

Boot the soft deleting trait for a model.

Return Value

void

bool|null forceDelete()

Force a hard delete on a soft deleted model.

Return Value

bool|null

bool|null restore()

Restore a soft-deleted model instance.

Return Value

bool|null

bool trashed()

Determine if the model instance has been soft-deleted.

Return Value

bool

static void restoring(Closure|string $callback)

Register a restoring model event with the dispatcher.

Parameters

Closure|string $callback

Return Value

void

static void restored(Closure|string $callback)

Register a restored model event with the dispatcher.

Parameters

Closure|string $callback

Return Value

void

bool isForceDeleting()

Determine if the model is currently force deleting.

Return Value

bool

string getDeletedAtColumn()

Get the name of the "deleted at" column.

Return Value

string

string getQualifiedDeletedAtColumn()

Get the fully qualified "deleted at" column.

Return Value

string

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Database/Eloquent/SoftDeletes.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部