model.relation.afterRemove
Called after removing a relation to the model (for AttachOneOrMany, HasOneOrMany & MorphOneOrMany relations)
Example usage:
$model->bindEvent('model.relation.afterRemove', function (string $relationName, \Winter\Storm\Database\Model $relatedModel) use (\Winter\Storm\Database\Model $model) { $relatedClass = get_class($relatedModel); $modelClass = get_class($model); traceLog("{$relatedClass} was removed from {$modelClass}."); });
Usage
Triggers
Copyright © 2024 Winter CMS