PHP Interface Esensi\Model\Contracts\SoftDeletingModelInterface

Author: Daniel LaBarge ([email protected])
Show file Open project: esensi/model

Public Methods

Method Description
forceDelete ( ) Force a hard delete on a soft deleted model.
getDeletedAtColumn ( ) : string Get the name of the "deleted at" column.
getQualifiedDeletedAtColumn ( ) : string Get the fully qualified "deleted at" column.
restore ( ) : boolean | null Restore a soft-deleted model instance.
restored ( Closure | string $callback ) Register a restored model event with the dispatcher.
restoring ( Closure | string $callback ) Register a restoring model event with the dispatcher.
trashed ( ) : boolean Determine if the model instance has been soft-deleted.

Method Details

forceDelete() public method

Force a hard delete on a soft deleted model.
public forceDelete ( )

getDeletedAtColumn() public method

Get the name of the "deleted at" column.
public getDeletedAtColumn ( ) : string
return string

getQualifiedDeletedAtColumn() public method

Get the fully qualified "deleted at" column.

restore() public method

Restore a soft-deleted model instance.
public restore ( ) : boolean | null
return boolean | null

restored() public static method

Register a restored model event with the dispatcher.
public static restored ( Closure | string $callback )
$callback Closure | string

restoring() public static method

Register a restoring model event with the dispatcher.
public static restoring ( Closure | string $callback )
$callback Closure | string

trashed() public method

Determine if the model instance has been soft-deleted.
public trashed ( ) : boolean
return boolean