model.relation.afterDissociate
Called after dissociating a relation to the model (only for BelongsTo/MorphTo relations)
Example usage:
$model->bindEvent('model.relation.afterDissociate', function (string $relationName, Model $relatedModel) use (\Winter\Storm\Database\Model $model) { $modelClass = get_class($model); traceLog("{$relationName} was dissociated from {$modelClass}."); });
Usage
Triggers
Class or file | Line |
---|---|
Winter\Storm\Database\Relations\Concerns\BelongsOrMorphsTo
|
83 |
Copyright © 2024 Winter CMS