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

Copyright © 2024 Winter CMS