PHP Class Askedio\SoftCascade\SoftCascade

Afficher le fichier Open project: askedio/laravel5-soft-cascade

Protected Properties

Свойство Type Description
$direction

Méthodes publiques

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

Private Methods

Méthode 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 méthode

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

Property Details

$direction protected_oe property

protected $direction