PHP Class Askedio\SoftCascade\SoftCascade

Exibir arquivo Open project: askedio/laravel5-soft-cascade

Protected Properties

Property Type Description
$direction

Public Methods

Method Description
cascade ( Illuminate\Database\Eloquent\Model $model, string $direction ) : void Cascade over Eloquent items.

Private Methods

Method Description
execute ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : void Execute delete, or restore.
isCascadable ( Illuminate\Database\Eloquent\Model $model ) : boolean Check if the model is enabled to cascade.
nestedRelation ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : Illuminate\Database\Eloquent\Relations\Relatio Return the relation withTrashed if being restored.
relations ( Illuminate\Database\Eloquent\Model $model, array $relations ) : mixed Iterate over the relations.
run ( Illuminate\Database\Eloquent\Model $model ) : void Run the cascade.
runNestedRelations ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : void Run nested relations.
validateRelation ( Illuminate\Database\Eloquent\Model $model, string $relation ) : void Validate the relation method exists and is a type of Eloquent Relation.

Method Details

cascade() public method

Cascade over Eloquent items.
public cascade ( Illuminate\Database\Eloquent\Model $model, string $direction ) : void
$model Illuminate\Database\Eloquent\Model
$direction string delete|restore
return void

Property Details

$direction protected_oe property

protected $direction